aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/matroskaenc.c
diff options
context:
space:
mode:
authorDavid Conrad <lessen42@gmail.com>2007-09-05 00:25:27 +0000
committerDavid Conrad <lessen42@gmail.com>2007-09-05 00:25:27 +0000
commit0b38843a6cb46567e439d4db6830f8ae338b7935 (patch)
tree65859a9e4ee3e89e4e33f29cb494b7a670c6f8fd /libavformat/matroskaenc.c
parent47e08c58609011ec305f65449d2d7c5ef6de0aa3 (diff)
downloadffmpeg-0b38843a6cb46567e439d4db6830f8ae338b7935.tar.gz
Return AVERROR(ENOMEM) when appropriate
Originally committed as revision 10368 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/matroskaenc.c')
-rw-r--r--libavformat/matroskaenc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index dfcf6f0d31..d7726bcd29 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -270,7 +270,7 @@ static int mkv_add_seekhead_entry(mkv_seekhead *seekhead, unsigned int elementid
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 @@ static int mkv_add_cuepoint(mkv_cues *cues, AVPacket *pkt, offset_t cluster_pos)
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 @@ static int mkv_write_header(AVFormatContext *s)
mkv->cues = mkv_start_cues(mkv->segment_offset);
if (mkv->cues == NULL)
- return -1;
+ return AVERROR(ENOMEM);
return 0;
}