h264decoder: Don't handle gap frame num for the first picture

If the first picture is not IDR, it would have non-zero frame_num
but it's not gap. We should skip gap frame handling in that case
This commit is contained in:
Seungha Yang 2020-04-20 22:48:43 +09:00
parent 6a7ea29084
commit ba07768ca4

View file

@ -613,7 +613,8 @@ gst_h264_decoder_start_current_picture (GstH264Decoder * self)
/* 7.4.3 */
if (frame_num != priv->prev_ref_frame_num &&
frame_num != (priv->prev_ref_frame_num + 1) % priv->max_frame_num) {
frame_num != (priv->prev_ref_frame_num + 1) % priv->max_frame_num &&
gst_h264_dpb_get_size (priv->dpb) > 0) {
if (!gst_h264_decoder_handle_frame_num_gap (self, frame_num))
return FALSE;
}