ffmpeg_opt: fix ffserver with the 2 encoder contexts
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 1 Jun 2014 15:29:59 +0000 (17:29 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 1 Jun 2014 15:29:59 +0000 (17:29 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
ffmpeg_opt.c

index d90edc1..aabcfc0 100644 (file)
@@ -1632,6 +1632,7 @@ static int read_ffserver_streams(OptionsContext *o, AVFormatContext *s, const ch
             choose_sample_fmt(st, codec);
         else if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO && !ost->stream_copy)
             choose_pixel_fmt(st, st->codec, codec, st->codec->pix_fmt);
+        avcodec_copy_context(ost->enc_ctx, st->codec);
     }
 
     avformat_close_input(&ic);