changeset 1480:2355202d4c4c libavformat

simplify
author michael
date Sat, 11 Nov 2006 19:47:58 +0000
parents 6a33963be49a
children 08322a7e3804
files nutdec.c
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/nutdec.c	Sat Nov 11 19:43:55 2006 +0000
+++ b/nutdec.c	Sat Nov 11 19:47:58 2006 +0000
@@ -482,15 +482,13 @@
 
     /* main header */
     pos=0;
-    for(;;){
+    do{
         pos= find_startcode(bc, MAIN_STARTCODE, pos)+1;
         if (pos<0+1){
             av_log(s, AV_LOG_ERROR, "no main startcode found\n");
             return -1;
         }
-        if(decode_main_header(nut) >= 0)
-            break;
-    }
+    }while(decode_main_header(nut) < 0);
 
     /* stream headers */
     pos=0;