diff mjpeg.c @ 2453:f67b63ed036d libavcodec

avoid buf_size == 0 checks in every decoder
author michael
date Sun, 23 Jan 2005 18:09:06 +0000
parents ba01b8552bd4
children e25782262d7d
line wrap: on
line diff
--- a/mjpeg.c	Sun Jan 23 17:59:01 2005 +0000
+++ b/mjpeg.c	Sun Jan 23 18:09:06 2005 +0000
@@ -1826,10 +1826,6 @@
     int start_code;
     AVFrame *picture = data;
 
-    /* no supplementary picture */
-    if (buf_size == 0)
-        return 0;
-
     buf_ptr = buf;
     buf_end = buf + buf_size;
     while (buf_ptr < buf_end) {
@@ -2002,10 +1998,6 @@
     uint32_t dqt_offs, dht_offs, sof_offs, sos_offs, second_field_offs;
     uint32_t field_size, sod_offs;
 
-    /* no supplementary picture */
-    if (buf_size == 0)
-        return 0;
-
     buf_ptr = buf;
     buf_end = buf + buf_size;
     
@@ -2115,10 +2107,6 @@
     uint8_t *buf_ptr, *buf_end, *recoded;
     int i = 0, j = 0;
 
-    /* no supplementary picture */
-    if (buf_size == 0)
-        return 0;
-
     if (!avctx->width || !avctx->height)
 	return -1;