Mercurial > mplayer.hg
changeset 33607:a761fc66ddc7
Do not set priv->pb for AVFMT_NOFILE formats, this now causes FFmpeg to error out.
Fixes bug #1937.
author | reimar |
---|---|
date | Tue, 21 Jun 2011 20:28:53 +0000 |
parents | 959708d3e6f5 |
children | 3348a9e99214 |
files | libmpdemux/demux_lavf.c |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpdemux/demux_lavf.c Tue Jun 21 19:44:24 2011 +0000 +++ b/libmpdemux/demux_lavf.c Tue Jun 21 20:28:53 2011 +0000 @@ -529,10 +529,12 @@ } else av_strlcat(mp_filename, "foobar.dummy", sizeof(mp_filename)); + if (!(priv->avif->flags & AVFMT_NOFILE)) { priv->pb = av_alloc_put_byte(priv->buffer, BIO_BUFFER_SIZE, 0, demuxer, mp_read, NULL, mp_seek); priv->pb->read_seek = mp_read_seek; priv->pb->is_streamed = !demuxer->stream->end_pos || (demuxer->stream->flags & MP_STREAM_SEEK) != MP_STREAM_SEEK; + } if(av_open_input_stream(&avfc, priv->pb, mp_filename, priv->avif, &ap)<0){ mp_msg(MSGT_HEADER,MSGL_ERR,"LAVF_header: av_open_input_stream() failed\n");