[FFmpeg-cvslog] idcin: fix return check

Vittorio Giovara git at videolan.org
Mon Oct 20 21:07:42 CEST 2014


ffmpeg | branch: master | Vittorio Giovara <vittorio.giovara at gmail.com> | Sat Oct 18 01:12:11 2014 +0100| [8ab3b71e4b343cec3fa369a880ab4496d7345154] | committer: Vittorio Giovara

idcin: fix return check

CC: libav-stable at libav.org
Bug-Id: CID 732198

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

 libavformat/idcin.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/idcin.c b/libavformat/idcin.c
index 2536e8b..3aa0e3e 100644
--- a/libavformat/idcin.c
+++ b/libavformat/idcin.c
@@ -317,9 +317,9 @@ static int idcin_read_packet(AVFormatContext *s,
 
             pal = av_packet_new_side_data(pkt, AV_PKT_DATA_PALETTE,
                                           AVPALETTE_SIZE);
-            if (ret < 0) {
+            if (!pal) {
                 av_free_packet(pkt);
-                return ret;
+                return AVERROR(ENOMEM);
             }
             memcpy(pal, palette, AVPALETTE_SIZE);
             pkt->flags |= AV_PKT_FLAG_KEY;



More information about the ffmpeg-cvslog mailing list