avformat/assenc: optimize writing dialogs
authorMarton Balint <cus@passwd.hu>
Mon, 5 Aug 2019 20:36:56 +0000 (22:36 +0200)
committerMarton Balint <cus@passwd.hu>
Sat, 17 Aug 2019 16:39:49 +0000 (18:39 +0200)
An example where the preivously added API can be useful.

Also fixes ticket #6390.

Signed-off-by: Marton Balint <cus@passwd.hu>
libavformat/assenc.c

index d50f18f..12aadca 100644 (file)
@@ -95,7 +95,7 @@ static void purge_dialogues(AVFormatContext *s, int force)
                    ass->expected_readorder, dialogue->readorder);
             ass->expected_readorder = dialogue->readorder;
         }
-        avio_printf(s->pb, "Dialogue: %s\r\n", dialogue->line);
+        avio_print(s->pb, "Dialogue: ", dialogue->line, "\r\n");
         if (dialogue == ass->last_added_dialogue)
             ass->last_added_dialogue = next;
         av_freep(&dialogue->line);