diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-03-05 01:19:52 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-03-05 01:20:25 +0100 |
commit | 2eb890aab22d9cc20df140615008a7c4eec9ac7b (patch) | |
tree | 068dbe28453a9823722fc40575cee683fc2871de /libavformat | |
parent | 9575d8a652c07ac26dc797f78a53ec82f6db38fc (diff) | |
parent | c13ab42a0a3979b2c292b2315487f5f5e14ba26b (diff) | |
download | ffmpeg-2eb890aab22d9cc20df140615008a7c4eec9ac7b.tar.gz |
Merge commit 'c13ab42a0a3979b2c292b2315487f5f5e14ba26b'
* commit 'c13ab42a0a3979b2c292b2315487f5f5e14ba26b':
rtpdec_qt: Use a local variable instead of RTP_FLAG_KEY
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/rtpdec_qt.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libavformat/rtpdec_qt.c b/libavformat/rtpdec_qt.c index a5f1480db6..ba701dc6cf 100644 --- a/libavformat/rtpdec_qt.c +++ b/libavformat/rtpdec_qt.c @@ -47,7 +47,8 @@ static int qt_rtp_parse_packet(AVFormatContext *s, PayloadContext *qt, AVIOContext pb; GetBitContext gb; int packing_scheme, has_payload_desc, has_packet_info, alen, - has_marker_bit = flags & RTP_FLAG_MARKER; + has_marker_bit = flags & RTP_FLAG_MARKER, + keyframe; if (qt->remaining) { int num = qt->pkt.size / qt->bytes_per_frame; @@ -79,8 +80,7 @@ static int qt_rtp_parse_packet(AVFormatContext *s, PayloadContext *qt, skip_bits(&gb, 4); // version if ((packing_scheme = get_bits(&gb, 2)) == 0) return AVERROR_INVALIDDATA; - if (get_bits1(&gb)) - flags |= RTP_FLAG_KEY; + keyframe = get_bits1(&gb); has_payload_desc = get_bits1(&gb); has_packet_info = get_bits1(&gb); skip_bits(&gb, 23); // reserved:7, cache payload info:1, payload ID:15 @@ -196,7 +196,7 @@ static int qt_rtp_parse_packet(AVFormatContext *s, PayloadContext *qt, qt->pkt.size = 0; qt->pkt.data = NULL; - pkt->flags = flags & RTP_FLAG_KEY ? AV_PKT_FLAG_KEY : 0; + pkt->flags = keyframe ? AV_PKT_FLAG_KEY : 0; pkt->stream_index = st->index; memset(pkt->data + pkt->size, 0, FF_INPUT_BUFFER_PADDING_SIZE); return 0; @@ -211,7 +211,7 @@ static int qt_rtp_parse_packet(AVFormatContext *s, PayloadContext *qt, if (av_new_packet(pkt, qt->bytes_per_frame)) return AVERROR(ENOMEM); memcpy(pkt->data, buf + avio_tell(&pb), qt->bytes_per_frame); - pkt->flags = flags & RTP_FLAG_KEY ? AV_PKT_FLAG_KEY : 0; + pkt->flags = keyframe ? AV_PKT_FLAG_KEY : 0; pkt->stream_index = st->index; if (qt->remaining > 0) { av_freep(&qt->pkt.data); |