mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
lavc: Fix side data handling for audio decoders.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
11828b8885
commit
77af2672b4
@ -868,14 +868,14 @@ int attribute_align_arg avcodec_decode_audio3(AVCodecContext *avctx, int16_t *sa
|
||||
{
|
||||
int ret;
|
||||
|
||||
avctx->pkt = avpkt;
|
||||
|
||||
if (!avpkt->data && avpkt->size) {
|
||||
av_log(avctx, AV_LOG_ERROR, "invalid packet: NULL data, size != 0\n");
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
|
||||
if((avctx->codec->capabilities & CODEC_CAP_DELAY) || avpkt->size){
|
||||
av_packet_split_side_data(avpkt);
|
||||
avctx->pkt = avpkt;
|
||||
//FIXME remove the check below _after_ ensuring that all audio check that the available space is enough
|
||||
if(*frame_size_ptr < AVCODEC_MAX_AUDIO_FRAME_SIZE){
|
||||
av_log(avctx, AV_LOG_ERROR, "buffer smaller than AVCODEC_MAX_AUDIO_FRAME_SIZE\n");
|
||||
|
Loading…
Reference in New Issue
Block a user