summaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2011-12-12 12:02:58 -0800
committerRonald S. Bultje <rsbultje@gmail.com>2011-12-16 11:24:18 -0800
commit0b4c323213343bf514626ee89a7ad91bfd428322 (patch)
tree3fb82025da273e79a3556c81acada36a27b5ce21 /libavcodec
parentb8909cb3648c135411c17152e2cb3fde4df452d3 (diff)
downloadffmpeg-streaming-0b4c323213343bf514626ee89a7ad91bfd428322.zip
ffmpeg-streaming-0b4c323213343bf514626ee89a7ad91bfd428322.tar.gz
h264: don't drop B-frames after next keyframe on POC reset.
The keyframe after a POC reset may not be the first to be returned to the user. Therefore, don't reset the expected next POC once we return a keyframe to the user, but once we know that the next frame in the return-queue is a keyframe.
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/h264.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 109a109..77acd71 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -1530,7 +1530,11 @@ static void decode_postinit(H264Context *h, int setup_finished){
h->next_outputed_poc = INT_MIN;
}
} else {
- h->next_outputed_poc = out->poc;
+ if (out_idx == 0 && pics > 1 && h->delayed_pic[0]->f.key_frame) {
+ h->next_outputed_poc = INT_MIN;
+ } else {
+ h->next_outputed_poc = out->poc;
+ }
}
h->mmco_reset = 0;
}else{
OpenPOWER on IntegriCloud