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

Michael Niedermayer michaelni at gmx.at
Wed Jun 27 02:09:57 CEST 2012


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

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

There seems to be only one solution to NIH syndrom, ... a shooting squad
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120627/4293514b/attachment.asc>


More information about the ffmpeg-devel mailing list