changeset 27457:16a2329e8776

handle the lavfpref demuxer in the same way as the lavf one
author aurel
date Wed, 27 Aug 2008 11:31:53 +0000
parents 8e31f43e161a
children ebf36d827c08
files command.c libmpcodecs/vd_ffmpeg.c libmpdemux/video.c
diffstat 3 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/command.c	Wed Aug 27 11:07:15 2008 +0000
+++ b/command.c	Wed Aug 27 11:31:53 2008 +0000
@@ -1356,6 +1356,7 @@
 
 	if ((mpctx->demuxer->type == DEMUXER_TYPE_MATROSKA
              || mpctx->demuxer->type == DEMUXER_TYPE_LAVF
+             || mpctx->demuxer->type == DEMUXER_TYPE_LAVF_PREFERRED
              || mpctx->demuxer->type == DEMUXER_TYPE_OGG)
              && d_sub && d_sub->sh && dvdsub_id >= 0) {
             const char* lang = ((sh_sub_t*)d_sub->sh)->lang;
--- a/libmpcodecs/vd_ffmpeg.c	Wed Aug 27 11:07:15 2008 +0000
+++ b/libmpcodecs/vd_ffmpeg.c	Wed Aug 27 11:31:53 2008 +0000
@@ -755,7 +755,8 @@
 
     avctx->hurry_up=(flags&3)?((flags&2)?2:1):0;
 
-    if(sh->ds->demuxer->type != DEMUXER_TYPE_LAVF)
+    if(sh->ds->demuxer->type != DEMUXER_TYPE_LAVF &&
+       sh->ds->demuxer->type != DEMUXER_TYPE_LAVF_PREFERRED)
     if(   sh->format == mmioFOURCC('R', 'V', '1', '0')
        || sh->format == mmioFOURCC('R', 'V', '1', '3')
        || sh->format == mmioFOURCC('R', 'V', '2', '0')
--- a/libmpdemux/video.c	Wed Aug 27 11:07:15 2008 +0000
+++ b/libmpdemux/video.c	Wed Aug 27 11:31:53 2008 +0000
@@ -587,6 +587,7 @@
       }
       break;
       case DEMUXER_TYPE_LAVF:
+      case DEMUXER_TYPE_LAVF_PREFERRED:
         if((int)sh_video->fps==1000 || (int)sh_video->fps<=1){
           double next_pts = ds_get_next_pts(d_video);
           double d= (next_pts != MP_NOPTS_VALUE) ? next_pts - d_video->pts : d_video->pts-pts1;