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

qwen dux qwendu at gmail.com
Sat Oct 13 15:49:12 CEST 2007


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?and  where is the place  that I can free
the demux_packet?



More information about the MPlayer-dev-eng mailing list