]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/bit.c
avformat/aviobuf: End grace period of allowing 0 from read_packet
[ffmpeg] / libavformat / bit.c
index 0aacfc7c386b593e3f116e30c10cb050ac42bebb..2dc7d4f3f70b3d09535ec786185a679e4779b264 100644 (file)
@@ -94,8 +94,8 @@ static int read_packet(AVFormatContext *s,
     if(ret != 8 * packet_size * sizeof(uint16_t))
         return AVERROR(EIO);
 
-    if (av_new_packet(pkt, packet_size) < 0)
-        return AVERROR(ENOMEM);
+    if ((ret = av_new_packet(pkt, packet_size)) < 0)
+        return ret;
 
     init_put_bits(&pbo, pkt->data, packet_size);
     for(j=0; j < packet_size; j++)