OSDN Git Service

ffmpeg: dont try to run the subtitle encoder on non subtitle streams
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 3 Mar 2014 19:45:41 +0000 (20:45 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 3 Mar 2014 20:06:24 +0000 (21:06 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
ffmpeg.c

index 332a233..de9af44 100644 (file)
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1894,7 +1894,8 @@ static int transcode_subtitles(InputStream *ist, AVPacket *pkt, int *got_output)
     for (i = 0; i < nb_output_streams; i++) {
         OutputStream *ost = output_streams[i];
 
-        if (!check_output_constraints(ist, ost) || !ost->encoding_needed)
+        if (!check_output_constraints(ist, ost) || !ost->encoding_needed
+            || ost->enc->type != AVMEDIA_TYPE_SUBTITLE)
             continue;
 
         do_subtitle_out(output_files[ost->file_index]->ctx, ost, ist, &subtitle);