mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 01:45:33 +00:00
vp9decoder: Simplify gst_v4l2_codecs_vp9_dec_fill_refs()
In case reference_frames is NULL, return outright. Remove the duplicate check from subsequent conditionals. No functional change. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5791>
This commit is contained in:
parent
4560cdff5c
commit
552a171671
1 changed files with 6 additions and 3 deletions
|
@ -271,19 +271,22 @@ gst_v4l2_codecs_vp9_dec_fill_refs (GstV4l2CodecVp9Dec * self,
|
|||
{
|
||||
GstVp9Picture *ref_pic;
|
||||
|
||||
if (reference_frames && reference_frames->pic_list[h->ref_frame_idx[0]]) {
|
||||
if (!reference_frames)
|
||||
return;
|
||||
|
||||
if (reference_frames->pic_list[h->ref_frame_idx[0]]) {
|
||||
ref_pic = reference_frames->pic_list[h->ref_frame_idx[0]];
|
||||
self->v4l2_vp9_frame.last_frame_ts =
|
||||
GST_CODEC_PICTURE_FRAME_NUMBER (ref_pic) * G_GUINT64_CONSTANT (1000);
|
||||
}
|
||||
|
||||
if (reference_frames && reference_frames->pic_list[h->ref_frame_idx[1]]) {
|
||||
if (reference_frames->pic_list[h->ref_frame_idx[1]]) {
|
||||
ref_pic = reference_frames->pic_list[h->ref_frame_idx[1]];
|
||||
self->v4l2_vp9_frame.golden_frame_ts =
|
||||
GST_CODEC_PICTURE_FRAME_NUMBER (ref_pic) * G_GUINT64_CONSTANT (1000);
|
||||
}
|
||||
|
||||
if (reference_frames && reference_frames->pic_list[h->ref_frame_idx[2]]) {
|
||||
if (reference_frames->pic_list[h->ref_frame_idx[2]]) {
|
||||
ref_pic = reference_frames->pic_list[h->ref_frame_idx[2]];
|
||||
self->v4l2_vp9_frame.alt_frame_ts =
|
||||
GST_CODEC_PICTURE_FRAME_NUMBER (ref_pic) * G_GUINT64_CONSTANT (1000);
|
||||
|
|
Loading…
Reference in a new issue