mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-31 11:32:38 +00:00
codecs: set sys frame num before new_picture()
Derive classes might need to operate on the current frame at their new_picture() vmethod, so it would be needed to set system_frame_number on picture before calling the vmethod. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1209>
This commit is contained in:
parent
0d637c14c5
commit
23e99a7a77
2 changed files with 4 additions and 4 deletions
|
@ -671,6 +671,8 @@ gst_h264_decoder_parse_slice (GstH264Decoder * self, GstH264NalUnit * nalu,
|
|||
|
||||
picture = gst_h264_picture_new ();
|
||||
picture->pts = pts;
|
||||
/* This allows accessing the frame from the picture. */
|
||||
picture->system_frame_number = priv->current_frame->system_frame_number;
|
||||
|
||||
if (klass->new_picture)
|
||||
ret = klass->new_picture (self, picture);
|
||||
|
@ -681,8 +683,6 @@ gst_h264_decoder_parse_slice (GstH264Decoder * self, GstH264NalUnit * nalu,
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
/* This allows accessing the frame from the picture. */
|
||||
picture->system_frame_number = priv->current_frame->system_frame_number;
|
||||
priv->current_picture = picture;
|
||||
gst_video_codec_frame_set_user_data (priv->current_frame,
|
||||
gst_h264_picture_ref (priv->current_picture),
|
||||
|
|
|
@ -395,6 +395,8 @@ gst_h265_decoder_parse_slice (GstH265Decoder * self, GstH265NalUnit * nalu,
|
|||
|
||||
picture = gst_h265_picture_new ();
|
||||
picture->pts = pts;
|
||||
/* This allows accessing the frame from the picture. */
|
||||
picture->system_frame_number = priv->current_frame->system_frame_number;
|
||||
|
||||
if (klass->new_picture)
|
||||
ret = klass->new_picture (self, picture);
|
||||
|
@ -405,8 +407,6 @@ gst_h265_decoder_parse_slice (GstH265Decoder * self, GstH265NalUnit * nalu,
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
/* This allows accessing the frame from the picture. */
|
||||
picture->system_frame_number = priv->current_frame->system_frame_number;
|
||||
priv->current_picture = picture;
|
||||
gst_video_codec_frame_set_user_data (priv->current_frame,
|
||||
gst_h265_picture_ref (priv->current_picture),
|
||||
|
|
Loading…
Reference in a new issue