[FFmpeg-devel] [PATCH] avformat/av1dec: check return value of the av_bsf_send_packet in annexb_read_packet
Andreas Rheinhardt
andreas.rheinhardt at gmail.com
Thu Nov 14 13:52:00 EET 2019
Steven Liu:
> CID: 1455685
> Signed-off-by: Steven Liu <lq at chinaffmpeg.org>
> ---
> libavformat/av1dec.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/libavformat/av1dec.c b/libavformat/av1dec.c
> index a0cad55668..7cbc7ef9bf 100644
> --- a/libavformat/av1dec.c
> +++ b/libavformat/av1dec.c
> @@ -193,7 +193,11 @@ retry:
> if (avio_feof(s->pb)) {
> if (c->temporal_unit_size || c->frame_unit_size)
> return AVERROR(EIO);
> - av_bsf_send_packet(c->bsf, NULL);
> + ret = av_bsf_send_packet(c->bsf, NULL);
> + if (ret < 0) {
> + av_log(s, AV_LOG_ERROR, "annexb filter failed to send input packet\n");
> + return ret;
> + }
> goto end;
> }
>
>
Actually, there is a difference between this call and the other calls
to av_bsf_send_packet(): This one only flushes (sends a NULL packet)
and therefore can't fail.
- Andreas
More information about the ffmpeg-devel
mailing list