Commit 803c058a authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/mov: Enable mp3 parsing if a packet needs it

Fixes Ticket5689
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 61da882c
...@@ -43,6 +43,7 @@ ...@@ -43,6 +43,7 @@
#include "libavutil/sha.h" #include "libavutil/sha.h"
#include "libavutil/timecode.h" #include "libavutil/timecode.h"
#include "libavcodec/ac3tab.h" #include "libavcodec/ac3tab.h"
#include "libavcodec/mpegaudiodecheader.h"
#include "avformat.h" #include "avformat.h"
#include "internal.h" #include "internal.h"
#include "avio_internal.h" #include "avio_internal.h"
...@@ -5340,6 +5341,10 @@ static int mov_read_packet(AVFormatContext *s, AVPacket *pkt) ...@@ -5340,6 +5341,10 @@ static int mov_read_packet(AVFormatContext *s, AVPacket *pkt)
return ret; return ret;
} }
#endif #endif
if (st->codecpar->codec_id == AV_CODEC_ID_MP3 && !st->need_parsing && pkt->size > 4) {
if (ff_mpa_check_header(AV_RB32(pkt->data)) < 0)
st->need_parsing = AVSTREAM_PARSE_FULL;
}
} }
pkt->stream_index = sc->ffindex; pkt->stream_index = sc->ffindex;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment