mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-23 23:21:06 +01:00
rmdec: fix crash in case of oom
Fixes ticket #2724 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
38ce775eea
commit
161047f010
1 changed files with 2 additions and 0 deletions
|
|
@ -722,6 +722,8 @@ static int rm_assemble_video_frame(AVFormatContext *s, AVIOContext *pb,
|
|||
|
||||
if(++vst->cur_slice > vst->slices)
|
||||
return 1;
|
||||
if(!vst->pkt.data)
|
||||
return AVERROR(ENOMEM);
|
||||
AV_WL32(vst->pkt.data - 7 + 8*vst->cur_slice, 1);
|
||||
AV_WL32(vst->pkt.data - 3 + 8*vst->cur_slice, vst->videobufpos - 8*vst->slices - 1);
|
||||
if(vst->videobufpos + len > vst->videobufsize)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue