Browse Source

ffmpeg: dont try to run the subtitle encoder on non subtitle streams

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.3
Michael Niedermayer 12 years ago
parent
commit
b79dfd16cb
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      ffmpeg.c

+ 2
- 1
ffmpeg.c View File

@@ -1894,7 +1894,8 @@ static int transcode_subtitles(InputStream *ist, AVPacket *pkt, int *got_output)
for (i = 0; i < nb_output_streams; i++) { for (i = 0; i < nb_output_streams; i++) {
OutputStream *ost = 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; continue;


do_subtitle_out(output_files[ost->file_index]->ctx, ost, ist, &subtitle); do_subtitle_out(output_files[ost->file_index]->ctx, ost, ist, &subtitle);


Loading…
Cancel
Save