[MPlayer-dev-eng] a question of demux_fill_buffer()

Nico Sabbi nicola_sabbi at fastwebnet.it
Sat Oct 13 18:55:57 CEST 2007


Il Saturday 13 October 2007 15:49:12 qwen dux ha scritto:
> Hi,
>      I want to fill audio and video buffer  to demux_packet buffer:
>
> static int demux_myself_fill_buffer(demuxer_t *demux,
> demux_stream_t *ds) {
>     /* ================== ADD AUDIO PACKET =================== */
>     alen =a_arg->len;
>     dp=new_demux_packet(alen);
>     dp->flags|=1; /* Keyframe */
>     dp->pts =a_arg->pts;
>
>     memcpy(dp->buffer,a_arg->buffer, alen);
>     ds_add_packet(demux->audio,dp);
>
>     /* ================== ADD VIDEO PACKET =================== */
>
>     vlen = v_arg->len;
>     dp=new_demux_packet(vlen);
>     dp->flags|=1; /* Keyframe */
>     dp->pts = v_arg->pts;
>     memcpy(dp->buffer,v_arg->buffer, alen);
>     ds_add_packet(demux->video,dp);
>
>  return 1;
> }
> Are there other arguments to set?

no, it's all fine as it is here

> and  where is the place  that I 
> can free the demux_packet?

nowhere: the demuxer layer does it



More information about the MPlayer-dev-eng mailing list