[FFmpeg-cvslog] dirac: fix inverted check

Michael Niedermayer git at videolan.org
Wed Jan 9 01:17:11 CET 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Jan  9 00:43:31 2013 +0100| [57bdd67646cfffa2921a8b28bb5f88cfe5c0989e] | committer: Michael Niedermayer

dirac: fix inverted check

Regression since: ea6da80
Fixes Ticket2123

I cannot reproduce any regressions by flipping the wrong condition
to how it should have been.

Thanks-to: ubitux
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=57bdd67646cfffa2921a8b28bb5f88cfe5c0989e
---

 libavcodec/dirac.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/dirac.c b/libavcodec/dirac.c
index 2dd754f..e132acc 100644
--- a/libavcodec/dirac.c
+++ b/libavcodec/dirac.c
@@ -237,7 +237,7 @@ static int parse_source_parameters(AVCodecContext *avctx, GetBitContext *gb,
 
     avctx->pix_fmt = dirac_pix_fmt[!luma_offset][source->chroma_format];
     avcodec_get_chroma_sub_sample(avctx->pix_fmt, &chroma_x_shift, &chroma_y_shift);
-    if (!(source->width % (1<<chroma_x_shift)) || !(source->height % (1<<chroma_y_shift))) {
+    if ((source->width % (1<<chroma_x_shift)) || (source->height % (1<<chroma_y_shift))) {
         av_log(avctx, AV_LOG_ERROR, "Dimensions must be a integer multiply of the chroma subsampling\n");
         return AVERROR_INVALIDDATA;
     }



More information about the ffmpeg-cvslog mailing list