|
|
|
@@ -341,7 +341,7 @@ static int handle_eac3(MOVMuxContext *mov, AVPacket *pkt, MOVTrack *track) |
|
|
|
info = track->eac3_priv; |
|
|
|
|
|
|
|
init_get_bits(&gbc, pkt->data, pkt->size * 8); |
|
|
|
if (avpriv_ac3_parse_header2(&gbc, &hdr) < 0) { |
|
|
|
if (avpriv_ac3_parse_header(&gbc, &hdr) < 0) { |
|
|
|
/* drop the packets until we see a good one */ |
|
|
|
if (!track->entry) { |
|
|
|
av_log(mov, AV_LOG_WARNING, "Dropping invalid packet from start of the stream\n"); |
|
|
|
@@ -391,7 +391,7 @@ static int handle_eac3(MOVMuxContext *mov, AVPacket *pkt, MOVTrack *track) |
|
|
|
while (cumul_size != pkt->size) { |
|
|
|
int i; |
|
|
|
init_get_bits(&gbc, pkt->data + cumul_size, (pkt->size - cumul_size) * 8); |
|
|
|
if (avpriv_ac3_parse_header2(&gbc, &hdr) < 0) |
|
|
|
if (avpriv_ac3_parse_header(&gbc, &hdr) < 0) |
|
|
|
return AVERROR_INVALIDDATA; |
|
|
|
if (hdr->frame_type != EAC3_FRAME_TYPE_DEPENDENT) |
|
|
|
return AVERROR(EINVAL); |
|
|
|
|