# HG changeset patch # User reimar # Date 1375623039 0 # Node ID 8fd75794d4f48721367946062017f26b28226d90 # Parent b14b9f22d7ea913821fd6a3e3efb02b1eedac39b Update for changed lavf API. The buffer now needs to have been allocated with av_malloc. diff -r b14b9f22d7ea -r 8fd75794d4f4 libmpdemux/demux_lavf.c --- a/libmpdemux/demux_lavf.c Sat Aug 03 01:06:22 2013 +0000 +++ b/libmpdemux/demux_lavf.c Sun Aug 04 13:30:39 2013 +0000 @@ -70,7 +70,7 @@ AVInputFormat *avif; AVFormatContext *avfc; AVIOContext *pb; - uint8_t buffer[BIO_BUFFER_SIZE]; + uint8_t *buffer; int audio_streams; int video_streams; int sub_streams; @@ -551,6 +551,7 @@ av_strlcat(mp_filename, "foobar.dummy", sizeof(mp_filename)); if (!(priv->avif->flags & AVFMT_NOFILE)) { + priv->buffer = av_mallocz(BIO_BUFFER_SIZE); priv->pb = avio_alloc_context(priv->buffer, BIO_BUFFER_SIZE, 0, demuxer, mp_read, NULL, mp_seek); priv->pb->read_seek = mp_read_seek; @@ -870,6 +871,7 @@ av_freep(&priv->avfc->key); avformat_close_input(&priv->avfc); } + av_freep(&priv->buffer); av_freep(&priv->pb); free(priv); demuxer->priv= NULL; }