aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-11-07 11:09:23 +0000
committerGravatar reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-11-07 11:09:23 +0000
commit25f0498660e8c335ddad8aa2019de0e94a2f156b (patch)
tree99b8e622d1173a5738ebff57fc3a1529bd0dabe4
parent35918325154651910a618843638ea4b9cf89edd0 (diff)
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
-rw-r--r--libmpdemux/demux_lavf.c8
1 files 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];