[FFmpeg-cvslog] avformat/rsd: Check av_new_packet() return value

Michael Niedermayer git at videolan.org
Sat Oct 17 12:59:24 CEST 2015


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sat Oct 17 12:11:16 2015 +0200| [92a26261d1ccc02c4fbdae2031e279009804c159] | committer: Michael Niedermayer

avformat/rsd: Check av_new_packet() return value

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=92a26261d1ccc02c4fbdae2031e279009804c159
---

 libavformat/rsd.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavformat/rsd.c b/libavformat/rsd.c
index 99912be..6b2016b 100644
--- a/libavformat/rsd.c
+++ b/libavformat/rsd.c
@@ -169,7 +169,9 @@ static int rsd_read_packet(AVFormatContext *s, AVPacket *pkt)
                codec->channels > 1) {
         int i, ch;
 
-        av_new_packet(pkt, codec->block_align);
+        ret = av_new_packet(pkt, codec->block_align);
+        if (ret < 0)
+            return ret;
         for (i = 0; i < 4; i++) {
             for (ch = 0; ch < codec->channels; ch++) {
                 pkt->data[ch * 8 + i * 2 + 0] = avio_r8(s->pb);



More information about the ffmpeg-cvslog mailing list