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,
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;
}
#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, \