# HG changeset patch # User iive # Date 1195814673 0 # Node ID c6702b710b2c999093d1431a12ffce14080e41b4 # Parent 1e76bb01331f8e8708bda5936c924006642466be Bring (de)muxer_lavf up to date with the libavformat API changes introduced by FFmpeg commit r11071. Patch for demuxer_lavf.c by Chris Welton - electrostatic_1 at yahoo Patch for muxer_lavf.c by me. Approved by michaelni. diff -r 1e76bb01331f -r c6702b710b2c libmpdemux/demux_lavf.c --- a/libmpdemux/demux_lavf.c Fri Nov 23 07:25:39 2007 +0000 +++ b/libmpdemux/demux_lavf.c Fri Nov 23 10:44:33 2007 +0000 @@ -64,7 +64,7 @@ typedef struct lavf_priv_t{ AVInputFormat *avif; AVFormatContext *avfc; - ByteIOContext pb; + ByteIOContext *pb; int audio_streams; int video_streams; int sub_streams; @@ -471,9 +471,9 @@ url_fopen(&priv->pb, mp_filename, URL_RDONLY); - ((URLContext*)(priv->pb.opaque))->priv_data= demuxer->stream; + ((URLContext*)(priv->pb->opaque))->priv_data= demuxer->stream; - if(av_open_input_stream(&avfc, &priv->pb, mp_filename, priv->avif, &ap)<0){ + 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"); return NULL; } diff -r 1e76bb01331f -r c6702b710b2c libmpdemux/muxer_lavf.c --- a/libmpdemux/muxer_lavf.c Fri Nov 23 07:25:39 2007 +0000 +++ b/libmpdemux/muxer_lavf.c Fri Nov 23 10:44:33 2007 +0000 @@ -40,7 +40,7 @@ typedef struct { //AVInputFormat *avif; AVFormatContext *oc; - ByteIOContext pb; + ByteIOContext *pb; int audio_streams; int video_streams; int64_t last_pts; @@ -317,7 +317,7 @@ av_freep(&(priv->oc->streams[i])); } - url_fclose(&(priv->oc->pb)); + url_fclose(priv->oc->pb); av_free(priv->oc); }