Merge double-nested if into && condition.
authorRonald S. Bultje <rsbultje@gmail.com>
Wed, 2 Jan 2008 18:53:12 +0000 (18:53 +0000)
committerDiego Biurrun <diego@biurrun.de>
Wed, 2 Jan 2008 18:53:12 +0000 (18:53 +0000)
patch by Ronald S. Bultje, rsbultje gmail com

Originally committed as revision 11374 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/rmdec.c

index 47ddb6d..9f733df 100644 (file)
@@ -716,10 +716,8 @@ resync:
         if (ff_rm_parse_packet (s, st, len, pkt, &seq, &flags, &timestamp) < 0)
             goto resync;
 
-        if(flags&2){
-            if((seq&0x7F) == 1)
+        if(flags&2 && (seq&0x7F) == 1)
                 av_add_index_entry(st, pos, timestamp, 0, 0, AVINDEX_KEYFRAME);
-        }
     }
 
     return 0;