[FFmpeg-devel] [PATCH 1/3] avformat/mxfdec: do not ignore bad size errors

Tomas Härdin tjoppen at acc.umu.se
Sun Aug 18 19:29:12 EEST 2019


lör 2019-08-17 klockan 21:41 +0200 skrev Marton Balint:
> The return value was unintentionally lost after
> 00a2652df3bf25a27d174cc67ed508b5317cb115.
> 
> Signed-off-by: Marton Balint <cus at passwd.hu>
> ---
>  libavformat/mxfdec.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
> index bb72fb9841..397f820b3f 100644
> --- a/libavformat/mxfdec.c
> +++ b/libavformat/mxfdec.c
> @@ -3508,8 +3508,8 @@ static int mxf_read_packet(AVFormatContext *s, AVPacket *pkt)
>                  } else {
>                      if ((size = next_ofs - pos) <= 0) {
>                          av_log(s, AV_LOG_ERROR, "bad size: %"PRId64"\n", size);
> -                        ret = AVERROR_INVALIDDATA;
> -                        goto skip;
> +                        mxf->current_klv_data = (KLVPacket){{0}};
> +                        return AVERROR_INVALIDDATA;

Should maybe ask for a sample. Else looks OK

/Tomas



More information about the ffmpeg-devel mailing list