diff options
-rw-r--r-- | libavformat/rtpdec_vp8.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libavformat/rtpdec_vp8.c b/libavformat/rtpdec_vp8.c index 6dbf402df6..966f7b8734 100644 --- a/libavformat/rtpdec_vp8.c +++ b/libavformat/rtpdec_vp8.c @@ -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; |