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
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel