summaryrefslogtreecommitdiff
authorJian Wang <jian.wang@amlogic.com>2017-05-25 07:07:28 (GMT)
committer Jian Wang <jian.wang@amlogic.com>2017-05-25 07:07:28 (GMT)
commit7c6eebf42347b3ed20a66dce2e26fbfbec4ca647 (patch)
tree90a070e088cee2d36298c0d61a0fd0f1a5028ca5
parenta6b2bdf05dd57ea5edce54a907003ecc663a2b5d (diff)
downloadffmpeg-7c6eebf42347b3ed20a66dce2e26fbfbec4ca647.zip
ffmpeg-7c6eebf42347b3ed20a66dce2e26fbfbec4ca647.tar.gz
ffmpeg-7c6eebf42347b3ed20a66dce2e26fbfbec4ca647.tar.bz2
PD#144784: fix mp2 in mov parsed mp3
Change-Id: Id257d803322d382f973b0f0590a80b90b91ed8a1
Diffstat
-rw-r--r--libavcodec/mpegaudio_parser.c3
-rw-r--r--libavformat/mov.c1
2 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/mpegaudio_parser.c b/libavcodec/mpegaudio_parser.c
index 8c39825..021cba4 100644
--- a/libavcodec/mpegaudio_parser.c
+++ b/libavcodec/mpegaudio_parser.c
@@ -91,6 +91,9 @@ static int mpegaudio_parse(AVCodecParserContext *s1,
avctx->bit_rate += (bit_rate - avctx->bit_rate) / (s->header_count - header_threshold);
}
}
+ if (avctx->codec_id == AV_CODEC_ID_MP3 && codec_id == AV_CODEC_ID_MP2) {
+ avctx->codec_id = AV_CODEC_ID_MP2;
+ }
if (s1->flags & PARSER_FLAG_COMPLETE_FRAMES) {
s->frame_size = 0;
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 0e04375..7730833 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -2190,6 +2190,7 @@ static int mov_finalize_stsd_codec(MOVContext *c, AVIOContext *pb,
case AV_CODEC_ID_MP3:
/* force type after stsd for m1a hdlr */
st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
+ st->need_parsing = AVSTREAM_PARSE_FULL;
break;
case AV_CODEC_ID_GSM:
case AV_CODEC_ID_ADPCM_MS: