From 25f0498660e8c335ddad8aa2019de0e94a2f156b Mon Sep 17 00:00:00 2001 From: reimar Date: Sat, 7 Nov 2009 11:09:23 +0000 Subject: [PATCH] Remove an empty program if the one requested by IDENTIFY_PROGRAM does not exist instead of incorrectly claiming that the demuxer does not support programs. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29845 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpdemux/demux_lavf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libmpdemux/demux_lavf.c b/libmpdemux/demux_lavf.c index 4bff317b9b..11bf988347 100644 --- a/libmpdemux/demux_lavf.c +++ b/libmpdemux/demux_lavf.c @@ -711,8 +711,9 @@ static int demux_lavf_control(demuxer_t *demuxer, int cmd, void *arg) int p, i; int start; - if(priv->avfc->nb_programs < 2) - return DEMUXER_CTRL_NOTIMPL; + prog->vid = prog->aid = prog->sid = -2; //no audio and no video by default + if(priv->avfc->nb_programs < 1) + return DEMUXER_CTRL_DONTKNOW; if(prog->progid == -1) { @@ -727,10 +728,9 @@ static int demux_lavf_control(demuxer_t *demuxer, int cmd, void *arg) if(priv->avfc->programs[i]->id == prog->progid) break; if(i==priv->avfc->nb_programs) - return DEMUXER_CTRL_NOTIMPL; + return DEMUXER_CTRL_DONTKNOW; p = i; } - prog->vid = prog->aid = prog->sid = -2; //no audio and no video by default start = p; redo: program = priv->avfc->programs[p];