[FFmpeg-cvslog] ffmpeg: Use correct codec_id for av_parser_change() check

Michael Niedermayer git at videolan.org
Mon Aug 24 17:45:27 CEST 2015


ffmpeg | branch: release/2.4 | Michael Niedermayer <michael at niedermayer.cc> | Fri Aug 21 03:04:41 2015 +0200| [e0bd87de8fa35d9a7bd94603fe1a22637143da72] | committer: Michael Niedermayer

ffmpeg: Use correct codec_id for av_parser_change() check

No testcase known

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 45f3d4e63e7807ff3d281f269625ed83f11e4cdc)

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e0bd87de8fa35d9a7bd94603fe1a22637143da72
---

 ffmpeg.c |    9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/ffmpeg.c b/ffmpeg.c
index 30f0be7..3efa7ff 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1687,12 +1687,11 @@ static void do_streamcopy(InputStream *ist, OutputStream *ost, const AVPacket *p
 
     opkt.duration = av_rescale_q(pkt->duration, ist->st->time_base, ost->st->time_base);
     opkt.flags    = pkt->flags;
-
     // FIXME remove the following 2 lines they shall be replaced by the bitstream filters
-    if (  ost->enc_ctx->codec_id != AV_CODEC_ID_H264
-       && ost->enc_ctx->codec_id != AV_CODEC_ID_MPEG1VIDEO
-       && ost->enc_ctx->codec_id != AV_CODEC_ID_MPEG2VIDEO
-       && ost->enc_ctx->codec_id != AV_CODEC_ID_VC1
+    if (  ost->st->codec->codec_id != AV_CODEC_ID_H264
+       && ost->st->codec->codec_id != AV_CODEC_ID_MPEG1VIDEO
+       && ost->st->codec->codec_id != AV_CODEC_ID_MPEG2VIDEO
+       && ost->st->codec->codec_id != AV_CODEC_ID_VC1
        ) {
         int ret = av_parser_change(ost->parser, ost->st->codec,
                              &opkt.data, &opkt.size,



More information about the ffmpeg-cvslog mailing list