mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
libs: decoder: h264: ensure num_ref_frames is greater than 0
Even if it is the h264parse fault or bad video file, vaapih264dec should set a proper value for VAPictureParameterBufferH264.num_ref_frames as the driver might use it. Also see "info.ref_frames = dpb_size;" in gstvaapidecoder_h264.c::ensure_context https://bugzilla.gnome.org/show_bug.cgi?id=793836
This commit is contained in:
parent
01d55f5667
commit
bfa2fbd39b
1 changed files with 3 additions and 0 deletions
|
@ -3857,6 +3857,9 @@ fill_picture (GstVaapiDecoderH264 * decoder, GstVaapiPictureH264 * picture)
|
|||
COPY_FIELD (sps, bit_depth_luma_minus8);
|
||||
COPY_FIELD (sps, bit_depth_chroma_minus8);
|
||||
COPY_FIELD (sps, num_ref_frames);
|
||||
if (pic_param->num_ref_frames == 0)
|
||||
pic_param->num_ref_frames = priv->dpb_size;
|
||||
|
||||
#if !VA_CHECK_VERSION(1,0,0)
|
||||
/* Deprecate H.264 baseline profile and FMO support */
|
||||
COPY_FIELD (pps, num_slice_groups_minus1);
|
||||
|
|
Loading…
Reference in a new issue