mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-06-30 04:47:37 +08:00
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.
This commit is contained in:
@ -1529,9 +1529,13 @@ static void decode_postinit(H264Context *h, int setup_finished){
|
|||||||
} else {
|
} else {
|
||||||
h->next_outputed_poc = INT_MIN;
|
h->next_outputed_poc = INT_MIN;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if (out_idx == 0 && pics > 1 && h->delayed_pic[0]->f.key_frame) {
|
||||||
|
h->next_outputed_poc = INT_MIN;
|
||||||
} else {
|
} else {
|
||||||
h->next_outputed_poc = out->poc;
|
h->next_outputed_poc = out->poc;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
h->mmco_reset = 0;
|
h->mmco_reset = 0;
|
||||||
}else{
|
}else{
|
||||||
av_log(s->avctx, AV_LOG_DEBUG, "no picture\n");
|
av_log(s->avctx, AV_LOG_DEBUG, "no picture\n");
|
||||||
|
Reference in New Issue
Block a user