]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/afc.c
avutil/pixdesc: Remove deprecated off-by-one fields from pix fmt descs
[ffmpeg] / libavformat / afc.c
index 542cb168fcff68e921364cb3cadd2793dacaf073..2da04eb5dc020a135f675600a8cc63e18873aefb 100644 (file)
@@ -31,6 +31,7 @@ static int afc_read_header(AVFormatContext *s)
 {
     AFCDemuxContext *c = s->priv_data;
     AVStream *st;
+    int ret;
 
     st = avformat_new_stream(s, NULL);
     if (!st)
@@ -40,8 +41,8 @@ static int afc_read_header(AVFormatContext *s)
     st->codecpar->channels   = 2;
     st->codecpar->channel_layout = AV_CH_LAYOUT_STEREO;
 
-    if (ff_alloc_extradata(st->codecpar, 1))
-        return AVERROR(ENOMEM);
+    if ((ret = ff_alloc_extradata(st->codecpar, 1)) < 0)
+        return ret;
     st->codecpar->extradata[0] = 8 * st->codecpar->channels;
 
     c->data_end = avio_rb32(s->pb) + 32LL;