]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/rtpdec_h263.c
avformat: Remove FFserver leftovers
[ffmpeg] / libavformat / rtpdec_h263.c
index 97aa4add3685c1392eca33fd8d9bc7fdd4ca052a..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;
@@ -89,7 +89,7 @@ int ff_h263_handle_packet(AVFormatContext *ctx, PayloadContext *data,
     return 0;
 }
 
-RTPDynamicProtocolHandler ff_h263_1998_dynamic_handler = {
+const RTPDynamicProtocolHandler ff_h263_1998_dynamic_handler = {
     .enc_name         = "H263-1998",
     .codec_type       = AVMEDIA_TYPE_VIDEO,
     .codec_id         = AV_CODEC_ID_H263,
@@ -97,7 +97,7 @@ RTPDynamicProtocolHandler ff_h263_1998_dynamic_handler = {
     .parse_packet     = ff_h263_handle_packet,
 };
 
-RTPDynamicProtocolHandler ff_h263_2000_dynamic_handler = {
+const RTPDynamicProtocolHandler ff_h263_2000_dynamic_handler = {
     .enc_name         = "H263-2000",
     .codec_type       = AVMEDIA_TYPE_VIDEO,
     .codec_id         = AV_CODEC_ID_H263,