diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2008-04-13 11:41:09 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2008-04-13 11:41:09 +0000 |
commit | 4a030a1fc72193bff28faaf63c7c706bda1426ae (patch) | |
tree | b4ec55f055a0a267cb040559803a8491ca6c9253 /libavformat/avidec.c | |
parent | e825656f1df41da334b0be699cb1f3b5ec9b3ffb (diff) | |
download | ffmpeg-4a030a1fc72193bff28faaf63c7c706bda1426ae.tar.gz |
Restructure if/else a little.
Originally committed as revision 12804 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/avidec.c')
-rw-r--r-- | libavformat/avidec.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavformat/avidec.c b/libavformat/avidec.c index 0d02f023eb..5126842fff 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -379,14 +379,15 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap) 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 */ |