[FFmpeg-devel] [PATCH] lavc/h263dec: return or propagate proper error codes
Stefano Sabatini
stefasab at gmail.com
Tue Sep 11 01:18:49 CEST 2012
On date Monday 2012-09-10 18:21:31 +0200, Michael Niedermayer encoded:
> On Mon, Sep 10, 2012 at 06:15:40PM +0200, Stefano Sabatini wrote:
> > Also add a missing log.
> > ---
> > libavcodec/h263dec.c | 41 +++++++++++++++++++++++------------------
> > 1 files changed, 23 insertions(+), 18 deletions(-)
> >
> > diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c
> > index 6c01e00..f3d6d9d 100644
> > --- a/libavcodec/h263dec.c
> > +++ b/libavcodec/h263dec.c
> > @@ -47,6 +47,7 @@
> > av_cold int ff_h263_decode_init(AVCodecContext *avctx)
> > {
> > MpegEncContext *s = avctx->priv_data;
> > + int ret;
> >
> > s->avctx = avctx;
> > s->out_format = FMT_H263;
>
> > @@ -110,15 +111,17 @@ av_cold int ff_h263_decode_init(AVCodecContext *avctx)
> > s->h263_flv = 1;
> > break;
> > default:
> > - return -1;
> > + av_log(avctx, AV_LOG_ERROR, "Invalid codec ID '%s'\n",
> > + avcodec_get_name(avctx->codec_id));
> > + return AVERROR(EINVAL);
> > }
>
> can this happen ? if not it could as well be an assert
No.
>
> the rest should be ok
Removed the log and applied.
--
FFmpeg = Fast Faithless Mournful Practical Easy Gymnast
More information about the ffmpeg-devel
mailing list