[MPlayer-cvslog] r33695 - trunk/libmpdemux/demux_lavf.c

reimar subversion at mplayerhq.hu
Tue Jun 21 22:28:54 CEST 2011


Author: reimar
Date: Tue Jun 21 22:28:53 2011
New Revision: 33695

Log:
Do not set priv->pb for AVFMT_NOFILE formats, this now causes FFmpeg to error out.

Fixes bug #1937.

Modified:
   trunk/libmpdemux/demux_lavf.c

Modified: trunk/libmpdemux/demux_lavf.c
==============================================================================
--- trunk/libmpdemux/demux_lavf.c	Tue Jun 21 21:44:24 2011	(r33694)
+++ trunk/libmpdemux/demux_lavf.c	Tue Jun 21 22:28:53 2011	(r33695)
@@ -529,10 +529,12 @@ static demuxer_t* demux_open_lavf(demuxe
     } 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");


More information about the MPlayer-cvslog mailing list