changeset 8383:4be7fab48777 libavcodec

Remove unreachable else clause, found by dark shikari.
author michael
date Thu, 18 Dec 2008 15:21:15 +0000
parents fe7d1c920aeb
children 9754fef77769
files h264.c
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/h264.c	Thu Dec 18 11:17:12 2008 +0000
+++ b/h264.c	Thu Dec 18 15:21:15 2008 +0000
@@ -4803,11 +4803,12 @@
         } else {
             return decode_cabac_intra_mb_type(h, 17, 0) + 5;
         }
-    } else if( h->slice_type_nos == FF_B_TYPE ) {
+    } else {
         const int mba_xy = h->left_mb_xy[0];
         const int mbb_xy = h->top_mb_xy;
         int ctx = 0;
         int bits;
+        assert(h->slice_type_nos == FF_B_TYPE);
 
         if( h->slice_table[mba_xy] == h->slice_num && !IS_DIRECT( s->current_picture.mb_type[mba_xy] ) )
             ctx++;
@@ -4836,9 +4837,6 @@
 
         bits= ( bits<<1 ) | get_cabac_noinline( &h->cabac, &h->cabac_state[27+5] );
         return bits - 4; /* B_L0_Bi_* through B_Bi_Bi_* */
-    } else {
-        /* TODO SI/SP frames? */
-        return -1;
     }
 }