[FFmpeg-cvslog] hqx: Merge invalid format check within switch block

Vittorio Giovara git at videolan.org
Mon Apr 20 04:40:03 CEST 2015


ffmpeg | branch: master | Vittorio Giovara <vittorio.giovara at gmail.com> | Thu Apr  9 18:09:31 2015 +0200| [17aa81d94781c6f62dc7d1dbd1f8891c020c9905] | committer: Vittorio Giovara

hqx: Merge invalid format check within switch block

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

 libavcodec/hqx.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libavcodec/hqx.c b/libavcodec/hqx.c
index 3de3dc2..a231afc 100644
--- a/libavcodec/hqx.c
+++ b/libavcodec/hqx.c
@@ -573,8 +573,7 @@ static int hqx_decode_frame(AVCodecContext *avctx, void *data,
         avctx->pix_fmt = AV_PIX_FMT_YUVA444P16;
         decode_func = hqx_decode_444a;
         break;
-    }
-    if (!decode_func) {
+    default:
         av_log(avctx, AV_LOG_ERROR, "Invalid format: %d.\n", ctx->format);
         return AVERROR_INVALIDDATA;
     }



More information about the ffmpeg-cvslog mailing list