[FFmpeg-devel] [PATCH] lavf: split packets before muxing.

Nicolas George nicolas.george at normalesup.org
Sat Dec 8 10:45:04 CET 2012


Le septidi 17 frimaire, an CCXXI, Clément Bœsch a écrit :
> So something like attached instead?

> +static inline int split_write_packet(AVFormatContext *s, AVPacket *pkt)
> +{
> +    int ret;
> +    AVPacket spkt = *pkt;
> +
> +    av_packet_split_side_data(&spkt);
> +    ret = s->oformat->write_packet(s, &spkt);
> +    spkt.data = NULL;
> +    av_destruct_packet(&spkt);
> +    return ret;
> +}

I find it nicer, thanks. I do not know how exactly
av_packet_split_side_data() works (some doxy would be nice), but I suppose
you checked it is the correct behaviour with regard to copy vs. new
allocation vs. free.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20121208/47e96c81/attachment.asc>


More information about the ffmpeg-devel mailing list