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

cehoyos subversion
Wed Sep 9 18:25:13 CEST 2009


Author: cehoyos
Date: Wed Sep  9 18:25:12 2009
New Revision: 19797

Log:
Factorise st->nb_index_entries check.

Patch by Maksym Veremeyenko, verem m1stereo tv

Modified:
   trunk/libavformat/avidec.c

Modified: trunk/libavformat/avidec.c
==============================================================================
--- trunk/libavformat/avidec.c	Tue Sep  8 21:25:54 2009	(r19796)
+++ trunk/libavformat/avidec.c	Wed Sep  9 18:25:12 2009	(r19797)
@@ -680,12 +680,15 @@ static int avi_read_packet(AVFormatConte
             AVIStream *ast = st->priv_data;
             int64_t ts= ast->frame_offset;
 
+            if(!st->nb_index_entries)
+                continue;
+
             if(ast->sample_size)
                 ts /= ast->sample_size;
             ts = av_rescale_q(ts, st->time_base, AV_TIME_BASE_Q);
 
 //            av_log(s, AV_LOG_DEBUG, "%"PRId64" %d/%d %"PRId64"\n", ts, st->time_base.num, st->time_base.den, ast->frame_offset);
-            if(ts < best_ts && st->nb_index_entries){
+            if(ts < best_ts){
                 best_ts= ts;
                 best_st= st;
                 best_stream_index= i;



More information about the ffmpeg-cvslog mailing list