mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-24 02:20:56 +01:00
raw demuxer: initialize end of partial packets
This commit is contained in:
parent
df9b956751
commit
54c7fe6d68
1 changed files with 4 additions and 0 deletions
|
|
@ -45,6 +45,10 @@ int ff_raw_read_partial_packet(AVFormatContext *s, AVPacket *pkt)
|
|||
if (ret < 0) {
|
||||
av_free_packet(pkt);
|
||||
return ret;
|
||||
} else if (ret < size) {
|
||||
/* initialize end of packet for partial reads to avoid reading
|
||||
* uninitialized data on allowed overreads */
|
||||
memset(pkt->data + ret, 0, FF_INPUT_BUFFER_PADDING_SIZE);
|
||||
}
|
||||
pkt->size = ret;
|
||||
return ret;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue