diff avidec.c @ 3210:7adc8fcec695 libavformat

Restructure if/else a little.
author michael
date Sun, 13 Apr 2008 11:41:09 +0000
parents cc2b6b91e9a2
children 2bf3b94c17d4
line wrap: on
line diff
--- a/avidec.c	Sun Apr 13 08:55:02 2008 +0000
+++ b/avidec.c	Sun Apr 13 11:41:09 2008 +0000
@@ -379,14 +379,15 @@
             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 */