[FFmpeg-devel] [PATCH] lavc/rawdec: clarify code in raw_decode()

Stefano Sabatini stefasab at gmail.com
Sat Jun 30 15:48:54 CEST 2012


On date Wednesday 2012-06-27 02:09:57 +0200, Michael Niedermayer encoded:
> On Tue, Jun 26, 2012 at 01:17:19PM +0200, Stefano Sabatini wrote:
> > Comment on an implicit assumption done by the code, helps readability.
> > ---
> >  libavcodec/rawdec.c |    1 +
> >  1 files changed, 1 insertions(+), 0 deletions(-)
> > 
> > diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c
> > index 09089ec..9686d8e 100644
> > --- a/libavcodec/rawdec.c
> > +++ b/libavcodec/rawdec.c
> > @@ -179,6 +179,7 @@ static int raw_decode(AVCodecContext *avctx,
> >              }
> >              linesize_align = 8;
> >          } else {
> > +            /* assume avctx->bits_per_coded_sample == 2 */
> 
> why not av_assert ?
> this way the assumptation would be checked too

Updated.
-- 
FFmpeg = Fantastic and Free Meaningless Philosophical Experimenting Generator
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-lavc-rawdec-add-assertion-check-in-raw_decode.patch
Type: text/x-diff
Size: 1116 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120630/e0cd788a/attachment.bin>


More information about the ffmpeg-devel mailing list