diff options
author | Martin Storsjö <martin@martin.st> | 2013-01-07 23:42:46 +0400 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2013-01-08 19:42:29 +0400 |
commit | 09ed8098ff66b2a606cdb6b92a97ca00d0ca04eb (patch) | |
tree | b085971ab1d1738c47fef860027a8aa762201502 /libavformat/rtpdec_vp8.c | |
parent | 92e354b655613b88c3c202a7e19e7037daed37eb (diff) |
rtpdec_vp8: Make sure the previous packet is returned
This is a bug from c7d4de3d73 - if the previous frame wasn't
returned yet (due to missing the final packets), but we have
enough data of it to return the first partition, we write that into
pkt and set returned_old_frame. That commit forgot returning 0 for
the case where this current packet didn't have the end_packet flag
set.
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/rtpdec_vp8.c')
-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; |