#include "libavutil/sha.h"
#include "libavutil/timecode.h"
#include "libavcodec/ac3tab.h"
+#include "libavcodec/mpegaudiodecheader.h"
#include "avformat.h"
#include "internal.h"
#include "avio_internal.h"
av_freep(&sc->rap_group);
av_freep(&sc->display_matrix);
- for (j = 0; j < sc->stsd_count; j++)
- av_free(sc->extradata[j]);
+ if (sc->extradata)
+ for (j = 0; j < sc->stsd_count; j++)
+ av_free(sc->extradata[j]);
av_freep(&sc->extradata);
av_freep(&sc->extradata_size);
return ret;
}
#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;