changeset 2499:77d6661f1947 libavformat

Return AVERROR(ENOMEM) when appropriate
author conrad
date Wed, 05 Sep 2007 00:25:27 +0000
parents b1cd4cd56eed
children 57954e76863d
files matroskaenc.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/matroskaenc.c	Wed Sep 05 00:25:24 2007 +0000
+++ b/matroskaenc.c	Wed Sep 05 00:25:27 2007 +0000
@@ -270,7 +270,7 @@
 
     entries = av_realloc(entries, (seekhead->num_entries + 1) * sizeof(mkv_seekhead_entry));
     if (entries == NULL)
-        return -1;
+        return AVERROR(ENOMEM);
 
     entries[new_entry].elementid = elementid;
     entries[new_entry].segmentpos = filepos - seekhead->segment_offset;
@@ -345,7 +345,7 @@
 
     entries = av_realloc(entries, (cues->num_entries + 1) * sizeof(mkv_cuepoint));
     if (entries == NULL)
-        return -1;
+        return AVERROR(ENOMEM);
 
     entries[new_entry].pts = pkt->pts;
     entries[new_entry].tracknum = pkt->stream_index + 1;
@@ -668,7 +668,7 @@
 
     mkv->cues = mkv_start_cues(mkv->segment_offset);
     if (mkv->cues == NULL)
-        return -1;
+        return AVERROR(ENOMEM);
 
     return 0;
 }