diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-09-08 08:55:05 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-09-08 08:55:05 +0000 |
commit | b05f2d0bdf86bc9eab7af9e752e481f7392aed4c (patch) | |
tree | 91b1d2050ce5193fa92c5b90ba25990dfbfaa19d /libmpdemux/demux_lavf.c | |
parent | f49f43015930892642f467eeeefe9788dcb11204 (diff) | |
download | mpv-b05f2d0bdf86bc9eab7af9e752e481f7392aed4c.tar.bz2 mpv-b05f2d0bdf86bc9eab7af9e752e481f7392aed4c.tar.xz |
Always register all streams from libavformat, not just those belonging to a program.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29657 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux/demux_lavf.c')
-rw-r--r-- | libmpdemux/demux_lavf.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/libmpdemux/demux_lavf.c b/libmpdemux/demux_lavf.c index a4f84eda71..392cd591e1 100644 --- a/libmpdemux/demux_lavf.c +++ b/libmpdemux/demux_lavf.c @@ -491,6 +491,8 @@ static demuxer_t* demux_open_lavf(demuxer_t *demuxer){ demuxer_add_chapter(demuxer, t ? t->value : NULL, start, end); } + for(i=0; i<avfc->nb_streams; i++) + handle_stream(demuxer, avfc, i); if(avfc->nb_programs) { int p, start=0, found=0; @@ -512,15 +514,11 @@ static demuxer_t* demux_open_lavf(demuxer_t *demuxer){ AVProgram *program = avfc->programs[p]; t = av_metadata_get(program->metadata, "title", NULL, 0); mp_msg(MSGT_HEADER,MSGL_INFO,"LAVF: Program %d %s\n", program->id, t ? t->value : ""); - for(i=0; i<program->nb_stream_indexes; i++) - handle_stream(demuxer, avfc, program->stream_index[i]); if(!priv->cur_program && (demuxer->video->sh || demuxer->audio->sh)) priv->cur_program = program->id; p = (p + 1) % avfc->nb_programs; } while(p!=start); - } else - for(i=0; i<avfc->nb_streams; i++) - handle_stream(demuxer, avfc, i); + } mp_msg(MSGT_HEADER,MSGL_V,"LAVF: %d audio and %d video streams found\n",priv->audio_streams,priv->video_streams); mp_msg(MSGT_HEADER,MSGL_V,"LAVF: build %d\n", LIBAVFORMAT_BUILD); |