[FFmpeg-trac] #5543(avcodec:new): av_packet_ref incorrectly processes packets with offset between data and buffer
FFmpeg
trac at avcodec.org
Thu May 12 12:43:23 CEST 2016
#5543: av_packet_ref incorrectly processes packets with offset between data and
buffer
------------------------------------+-----------------------------------
Reporter: mrlika | Owner:
Type: defect | Status: new
Priority: normal | Component: avcodec
Version: git-master | Resolution:
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
------------------------------------+-----------------------------------
Comment (by mrlika):
The fix is just to change
{{{
dst->data = dst->buf->data;
}}}
to
{{{
dst->data = dst->buf->data + (src->data - src->buf->data);
}}}
Probably some src->data and src->buf->data validations are required.
By the way because of this bug AVPacket *av_packet_clone(AVPacket *src)
that calls av_packt_ref internally clones incorrectly packets with
offset.The offset is lost.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/5543#comment:5>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list