diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-01-09 11:35:46 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-01-09 11:35:57 +0100 |
commit | 7b822b1de2eaae56b11b7bfe0d6768723ac67200 (patch) | |
tree | 49999c53938b23f32dde876697dc0615e7e20e5b | |
parent | aed58f6aae0c00a0df5ef31ec3362f47ce773f62 (diff) | |
parent | 9c80ed836a511293f4cc3a858060969d32f2b1ce (diff) | |
download | ffmpeg-7b822b1de2eaae56b11b7bfe0d6768723ac67200.tar.gz |
Merge commit '9c80ed836a511293f4cc3a858060969d32f2b1ce'
* commit '9c80ed836a511293f4cc3a858060969d32f2b1ce':
rtpdec_vp8: Avoid a warning about a possibly unused variable
rtpdec_vp8: Make sure the previous packet is returned
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/rtpdec_vp8.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/libavformat/rtpdec_vp8.c b/libavformat/rtpdec_vp8.c index de773f5d67..884abcc8da 100644 --- a/libavformat/rtpdec_vp8.c +++ b/libavformat/rtpdec_vp8.c @@ -70,7 +70,7 @@ static int vp8_handle_packet(AVFormatContext *ctx, PayloadContext *vp8, int extended_bits, part_id; int pictureid_present = 0, tl0picidx_present = 0, tid_present = 0, keyidx_present = 0; - int pictureid = -1, pictureid_mask; + int pictureid = -1, pictureid_mask = 0; int returned_old_frame = 0; uint32_t old_timestamp; @@ -233,12 +233,13 @@ static int vp8_handle_packet(AVFormatContext *ctx, PayloadContext *vp8, vp8->prev_seq = seq; avio_write(vp8->data, buf, len); + if (returned_old_frame) { + *timestamp = old_timestamp; + return end_packet ? 1 : 0; + } + if (end_packet) { int ret; - if (returned_old_frame) { - *timestamp = old_timestamp; - return 1; - } ret = ff_rtp_finalize_packet(pkt, &vp8->data, st->index); if (ret < 0) return ret; |