avisynth: Switch a couple of AVERROR_UNKNOWNs to AVERROR(ENOMEM)
authorStephen Hutchinson <qyot27@gmail.com>
Mon, 28 Oct 2013 20:52:51 +0000 (16:52 -0400)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 28 Oct 2013 21:30:20 +0000 (22:30 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/avisynth.c

index f34117c..92818a5 100644 (file)
@@ -468,7 +468,7 @@ static int avisynth_read_packet_video(AVFormatContext *s, AVPacket *pkt,
         return AVERROR_UNKNOWN;
     pkt->data = av_malloc(pkt->size);
     if (!pkt->data)
-        return AVERROR_UNKNOWN;
+        return AVERROR(ENOMEM);
 
     frame = avs_library->avs_get_frame(avs->clip, n);
     error = avs_library->avs_clip_get_error(avs->clip);
@@ -566,7 +566,7 @@ static int avisynth_read_packet_audio(AVFormatContext *s, AVPacket *pkt,
         return AVERROR_UNKNOWN;
     pkt->data = av_malloc(pkt->size);
     if (!pkt->data)
-        return AVERROR_UNKNOWN;
+        return AVERROR(ENOMEM);
 
     avs_library->avs_get_audio(avs->clip, pkt->data, n, samples);
     error = avs_library->avs_clip_get_error(avs->clip);