You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avcodec/dca: print error message when no frame is found in packet
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
committed by
Michael Niedermayer
parent
51a1c1c6ac
commit
365b0c13e4
@@ -179,8 +179,10 @@ static int dcadec_decode_frame(AVCodecContext *avctx, void *data,
|
|||||||
for (i = 0, ret = AVERROR_INVALIDDATA; i < input_size - MIN_PACKET_SIZE + 1 && ret < 0; i++)
|
for (i = 0, ret = AVERROR_INVALIDDATA; i < input_size - MIN_PACKET_SIZE + 1 && ret < 0; i++)
|
||||||
ret = convert_bitstream(input + i, input_size - i, s->buffer, s->buffer_size);
|
ret = convert_bitstream(input + i, input_size - i, s->buffer, s->buffer_size);
|
||||||
|
|
||||||
if (ret < 0)
|
if (ret < 0) {
|
||||||
|
av_log(avctx, AV_LOG_ERROR, "Not a valid DCA frame\n");
|
||||||
return ret;
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
input = s->buffer;
|
input = s->buffer;
|
||||||
input_size = ret;
|
input_size = ret;
|
||||||
@@ -296,6 +298,9 @@ static int dcadec_decode_frame(AVCodecContext *avctx, void *data,
|
|||||||
}
|
}
|
||||||
s->core_residual_valid = !!(s->core.filter_mode & DCA_FILTER_MODE_FIXED);
|
s->core_residual_valid = !!(s->core.filter_mode & DCA_FILTER_MODE_FIXED);
|
||||||
} else {
|
} else {
|
||||||
|
av_log(avctx, AV_LOG_ERROR, "No valid DCA sub-stream found\n");
|
||||||
|
if (s->core_only)
|
||||||
|
av_log(avctx, AV_LOG_WARNING, "Consider disabling 'core_only' option\n");
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user