Mercurial > mplayer.hg
changeset 29803:3b42ce7b09cf
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.
author | reimar |
---|---|
date | Sat, 07 Nov 2009 11:09:23 +0000 |
parents | c2e91cf65729 |
children | edecbb61e41f |
files | libmpdemux/demux_lavf.c |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpdemux/demux_lavf.c Sat Nov 07 09:23:11 2009 +0000 +++ b/libmpdemux/demux_lavf.c Sat Nov 07 11:09:23 2009 +0000 @@ -711,8 +711,9 @@ 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 @@ 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];