]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/rtpdec_h263.c
avformat/mpegts: Add missing constants for MPEG-TS stream_id definitions
[ffmpeg] / libavformat / rtpdec_h263.c
index 9b71ed7efe9d7aec7f0022f5fb410b1a9d5f769a..1905b435f8e1482a5c09f3764cc089807b0b3031 100644 (file)
@@ -30,7 +30,7 @@ int ff_h263_handle_packet(AVFormatContext *ctx, PayloadContext *data,
 {
     uint8_t *ptr;
     uint16_t header;
-    int startcode, vrc, picture_header;
+    int startcode, vrc, picture_header, ret;
 
     if (len < 2) {
         av_log(ctx, AV_LOG_ERROR, "Too short H.263 RTP packet\n");
@@ -73,9 +73,9 @@ int ff_h263_handle_packet(AVFormatContext *ctx, PayloadContext *data,
         return AVERROR_INVALIDDATA;
     }
 
-    if (av_new_packet(pkt, len + startcode)) {
+    if ((ret = av_new_packet(pkt, len + startcode)) < 0) {
         av_log(ctx, AV_LOG_ERROR, "Out of memory\n");
-        return AVERROR(ENOMEM);
+        return ret;
     }
     pkt->stream_index = st->index;
     ptr = pkt->data;