]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/rtpdec_qt.c
av_dump_format(): reduce indentation for streams
[ffmpeg] / libavformat / rtpdec_qt.c
index 77a3ce40be5ba2ebd8894d9bdc4491699f3f21ac..93bf31746baf77d9e9f2731c91fcd65b6102c0a9 100644 (file)
@@ -48,13 +48,13 @@ static int qt_rtp_parse_packet(AVFormatContext *s, PayloadContext *qt,
     GetBitContext gb;
     int packing_scheme, has_payload_desc, has_packet_info, alen,
         has_marker_bit = flags & RTP_FLAG_MARKER,
-        keyframe;
+        keyframe, ret;
 
     if (qt->remaining) {
         int num = qt->pkt.size / qt->bytes_per_frame;
 
-        if (av_new_packet(pkt, qt->bytes_per_frame))
-            return AVERROR(ENOMEM);
+        if ((ret = av_new_packet(pkt, qt->bytes_per_frame)) < 0)
+            return ret;
         pkt->stream_index = st->index;
         pkt->flags        = qt->pkt.flags;
         memcpy(pkt->data,
@@ -208,8 +208,8 @@ static int qt_rtp_parse_packet(AVFormatContext *s, PayloadContext *qt,
             alen % qt->bytes_per_frame != 0)
             return AVERROR_INVALIDDATA; /* wrongly padded */
         qt->remaining = (alen / qt->bytes_per_frame) - 1;
-        if (av_new_packet(pkt, qt->bytes_per_frame))
-            return AVERROR(ENOMEM);
+        if ((ret = av_new_packet(pkt, qt->bytes_per_frame)) < 0)
+            return ret;
         memcpy(pkt->data, buf + avio_tell(&pb), qt->bytes_per_frame);
         pkt->flags = keyframe ? AV_PKT_FLAG_KEY : 0;
         pkt->stream_index = st->index;
@@ -241,7 +241,7 @@ static void qt_rtp_close(PayloadContext *qt)
 }
 
 #define RTP_QT_HANDLER(m, n, s, t) \
-RTPDynamicProtocolHandler ff_ ## m ## _rtp_ ## n ## _handler = { \
+const RTPDynamicProtocolHandler ff_ ## m ## _rtp_ ## n ## _handler = { \
     .enc_name         = s, \
     .codec_type       = t, \
     .codec_id         = AV_CODEC_ID_NONE, \