]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/rtpdec_mpeg12.c
avutil/hwcontext_vulkan: fix format specifiers for some printed variables
[ffmpeg] / libavformat / rtpdec_mpeg12.c
index 43d9d5854c4a979c291f6c813482a8d891520075..e640220ebee151f587213e588baf9950cf49b6c2 100644 (file)
@@ -29,6 +29,7 @@ static int mpeg_parse_packet(AVFormatContext *ctx, PayloadContext *data,
                              int flags)
 {
     unsigned int h;
+    int ret;
     if (len <= 4)
         return AVERROR_INVALIDDATA;
     h    = AV_RB32(buf);
@@ -41,8 +42,8 @@ static int mpeg_parse_packet(AVFormatContext *ctx, PayloadContext *data,
         buf += 4;
         len -= 4;
     }
-    if (av_new_packet(pkt, len) < 0)
-        return AVERROR(ENOMEM);
+    if ((ret = av_new_packet(pkt, len)) < 0)
+        return ret;
     memcpy(pkt->data, buf, len);
     pkt->stream_index = st->index;
     return 0;