diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-01-27 16:17:42 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-01-27 16:17:42 +0100 |
commit | be023405a7cdbdd6b5d163de8beb1968ee4ef52e (patch) | |
tree | 19de2dcd0a29d535729e8dfde16d06ddfc275866 | |
parent | 392080cbe52868c00f8dfd4e60639c37a13165f4 (diff) | |
parent | f771b3ab5d3c0b763ee356152be550f4121babd0 (diff) | |
download | ffmpeg-be023405a7cdbdd6b5d163de8beb1968ee4ef52e.tar.gz |
Merge commit 'f771b3ab5d3c0b763ee356152be550f4121babd0'
* commit 'f771b3ab5d3c0b763ee356152be550f4121babd0':
avidec: do not export stream_codec_tag
Conflicts:
libavformat/avidec.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/mpeg4videodec.c | 3 | ||||
-rw-r--r-- | libavformat/avidec.c | 10 |
2 files changed, 9 insertions, 4 deletions
diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c index 1daecfa76e..4769dfdc52 100644 --- a/libavcodec/mpeg4videodec.c +++ b/libavcodec/mpeg4videodec.c @@ -2115,8 +2115,7 @@ int ff_mpeg4_workaround_bugs(AVCodecContext *avctx) MpegEncContext *s = &ctx->m; if (ctx->xvid_build == -1 && ctx->divx_version == -1 && ctx->lavc_build == -1) { - if (s->stream_codec_tag == AV_RL32("XVID") || - s->codec_tag == AV_RL32("XVID") || + if (s->codec_tag == AV_RL32("XVID") || s->codec_tag == AV_RL32("XVIX") || s->codec_tag == AV_RL32("RMP4") || s->codec_tag == AV_RL32("ZMP4") || diff --git a/libavformat/avidec.c b/libavformat/avidec.c index 7016d2d400..963af34dcf 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -43,6 +43,7 @@ typedef struct AVIStream { int remaining; int packet_size; + uint32_t handler; uint32_t scale; uint32_t rate; int sample_size; /* size of one sample (or packet) @@ -627,7 +628,7 @@ static int avi_read_header(AVFormatContext *s) } av_assert0(stream_index < s->nb_streams); - st->codec->stream_codec_tag = handler; + ast->handler = handler; avio_rl32(pb); /* flags */ avio_rl16(pb); /* priority */ @@ -774,6 +775,11 @@ static int avi_read_header(AVFormatContext *s) /* This is needed to get the pict type which is necessary * for generating correct pts. */ st->need_parsing = AVSTREAM_PARSE_HEADERS; + + if (st->codec->codec_id == AV_CODEC_ID_MPEG4 && + ast->handler == MKTAG('X', 'V', 'I', 'D')) + st->codec->codec_tag = MKTAG('X', 'V', 'I', 'D'); + if (st->codec->codec_tag == MKTAG('V', 'S', 'S', 'H')) st->need_parsing = AVSTREAM_PARSE_FULL; @@ -822,7 +828,7 @@ static int avi_read_header(AVFormatContext *s) st->need_parsing = AVSTREAM_PARSE_NONE; /* AVI files with Xan DPCM audio (wrongly) declare PCM * audio in the header but have Axan as stream_code_tag. */ - if (st->codec->stream_codec_tag == AV_RL32("Axan")) { + if (ast->handler == AV_RL32("Axan")) { st->codec->codec_id = AV_CODEC_ID_XAN_DPCM; st->codec->codec_tag = 0; ast->dshow_block_align = 0; |