[FFmpeg-cvslog] r12804 - trunk/libavformat/avidec.c

michael subversion
Sun Apr 13 13:41:09 CEST 2008


Author: michael
Date: Sun Apr 13 13:41:09 2008
New Revision: 12804

Log:
Restructure if/else a little.


Modified:
   trunk/libavformat/avidec.c

Modified: trunk/libavformat/avidec.c
==============================================================================
--- trunk/libavformat/avidec.c	(original)
+++ trunk/libavformat/avidec.c	Sun Apr 13 13:41:09 2008
@@ -379,14 +379,15 @@ static int avi_read_header(AVFormatConte
             get_le32(pb); /* initial frame */
             ast->scale = get_le32(pb);
             ast->rate = get_le32(pb);
-            if(ast->scale && ast->rate){
-            }else if(frame_period){
+            if(!(ast->scale && ast->rate)){
+            if(frame_period){
                 ast->rate = 1000000;
                 ast->scale = frame_period;
             }else{
                 ast->rate = 25;
                 ast->scale = 1;
             }
+            }
             av_set_pts_info(st, 64, ast->scale, ast->rate);
 
             ast->cum_len=get_le32(pb); /* start */




More information about the ffmpeg-cvslog mailing list