On Sat, Mar 7, 2015 at 11:40 AM, Hendrik Leppkes <[email protected]> wrote: > On Sat, Mar 7, 2015 at 11:24 AM, Vittorio Giovara > <[email protected]> wrote: >> On Sat, Mar 7, 2015 at 9:19 AM, Luca Barbato <[email protected]> wrote: >>> On 07/03/15 10:03, Vittorio Giovara wrote: >>>> >>>> Signed-off-by: Vittorio Giovara <[email protected]> >>>> --- >>> >>> >>>> + ret = ff_mjpeg_decode_frame(avctx, ctx->jpgframe, &got_frame, &jpkt); >>>> + if (ret < 0 || !got_frame || ctx->jpgframe->format != >>>> AV_PIX_FMT_YUVJ420P) { >>>> + av_log(avctx, AV_LOG_ERROR, >>>> + "Jpeg decoding error (%d) for (%d) frame.\n", >>>> + ret, got_frame); >>>> + >>>> + /* Normally skip, error if explode */ >>>> + return -(avctx->err_recognition & AV_EF_EXPLODE); >>> >>> >>> if () >>> return AVERROR_INVALIDDATA; >> >> it's if() return AVERROR_INVALIDDATA else return 0 >> I'm not sure if it's even worth doing > > At the very least it gives a consistent error value, isn't that > something I see random patches for all the time?
I was referring to whether it makes sense to keep going or to fail in case of error here -- Vittorio _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
