|
|
@@ -156,6 +156,15 @@ static int latm_write_packet(AVFormatContext *s, AVPacket *pkt) |
|
|
av_log(s, AV_LOG_ERROR, "ADTS header detected - ADTS will not be incorrectly muxed into LATM\n"); |
|
|
av_log(s, AV_LOG_ERROR, "ADTS header detected - ADTS will not be incorrectly muxed into LATM\n"); |
|
|
return AVERROR_INVALIDDATA; |
|
|
return AVERROR_INVALIDDATA; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (!s->streams[0]->codec->extradata) { |
|
|
|
|
|
if(pkt->size > 2 && pkt->data[0] == 0x56 && (pkt->data[1] >> 4) == 0xe && |
|
|
|
|
|
(AV_RB16(pkt->data + 1) & 0x1FFF) + 3 == pkt->size) |
|
|
|
|
|
return ff_raw_write_packet(s, pkt); |
|
|
|
|
|
else |
|
|
|
|
|
return AVERROR_INVALIDDATA; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if (pkt->size > 0x1fff) |
|
|
if (pkt->size > 0x1fff) |
|
|
goto too_large; |
|
|
goto too_large; |
|
|
|
|
|
|
|
|
|