Try to guess input length for lavf input
authorYasuhiro Ikeda <wipple625@gmail.com>
Tue, 3 Aug 2010 13:10:15 +0000 (22:10 +0900)
committerJason Garrett-Glaser <darkshikari@gmail.com>
Mon, 16 Aug 2010 09:53:48 +0000 (02:53 -0700)
Allows printing of progress indicator when using lavf input.

input/lavf.c

index 55112bf..52e890c 100644 (file)
@@ -162,7 +162,7 @@ static int open_file( char *psz_filename, hnd_t *p_handle, video_info_t *info, c
     info->width      = c->width;
     info->height     = c->height;
     info->csp        = h->first_pic->img.csp;
     info->width      = c->width;
     info->height     = c->height;
     info->csp        = h->first_pic->img.csp;
-    info->num_frames = 0; /* FIXME */
+    info->num_frames = h->lavf->streams[i]->nb_frames;
     info->sar_height = c->sample_aspect_ratio.den;
     info->sar_width  = c->sample_aspect_ratio.num;
 
     info->sar_height = c->sample_aspect_ratio.den;
     info->sar_width  = c->sample_aspect_ratio.num;