[FFmpeg-devel] [PATCH] lavc/lavf: transmit stream_id information for mpegts KLV data packets
Marton Balint
cus at passwd.hu
Fri Feb 5 01:15:47 CET 2016
On Thu, 4 Feb 2016, Stefano Sabatini wrote:
> On date Wednesday 2016-02-03 10:18:34 +0100, Stefano Sabatini encoded:
> [...]
>> Note: since my purpose is to allow remuxing KLV data, I can change
>> this to enable stream_id side-data only with data streams (so that no
>> reference must be changed).
>>
>> Since I have no strong opinion on this I'd change in case someone has
>> a preference.
I have no strong preference either. Unless it is a noticable performance
hit, I think it is fine to add the stream id to all packets.
The mpegts demuxer part seems fine, one thing I may change is that in
new_pes_packet, you allocate the side data in the beginning of the
function after assigning pes->buffer to the packet buffer.
Probably it would be better if you could allocate the side data in the end
of the function, after setting pes->buffer to NULL so the allocated buffer
will not belong to both the pes->buf and pkt->buf, therefore in case of
ENOMEM at least we will have a chance of freeing it properly.
Regards,
Marton
More information about the ffmpeg-devel
mailing list