mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-19 08:11:16 +00:00
decoder: h264: fix marking of non-reference picture into DPB.
Fix search for a picture in the DPB that has a lower POC value than
the current picture. The dpb_find_lowest_poc() function will return
a picture with the lowest POC in DPB and that is marked as "needed
for output", but an additional check against the actual POC value
of the current picture is needed.
This is a regression from 1c46990
.
https://bugzilla.gnome.org/show_bug.cgi?id=732130
This commit is contained in:
parent
8db72147c7
commit
bea0d07042
1 changed files with 3 additions and 1 deletions
|
@ -955,8 +955,10 @@ dpb_add(GstVaapiDecoderH264 *decoder, GstVaapiPictureH264 *picture)
|
||||||
if (!picture->output_flag && !StoreInterViewOnlyRefFlag)
|
if (!picture->output_flag && !StoreInterViewOnlyRefFlag)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
while (priv->dpb_count == priv->dpb_size) {
|
while (priv->dpb_count == priv->dpb_size) {
|
||||||
|
GstVaapiPictureH264 *found_picture;
|
||||||
if (!StoreInterViewOnlyRefFlag) {
|
if (!StoreInterViewOnlyRefFlag) {
|
||||||
if (dpb_find_lowest_poc(decoder, picture, NULL) < 0)
|
if (dpb_find_lowest_poc(decoder, picture, &found_picture) < 0 ||
|
||||||
|
found_picture->base.poc > picture->base.poc)
|
||||||
return dpb_output(decoder, NULL, picture);
|
return dpb_output(decoder, NULL, picture);
|
||||||
}
|
}
|
||||||
if (!dpb_bump(decoder, picture))
|
if (!dpb_bump(decoder, picture))
|
||||||
|
|
Loading…
Reference in a new issue