mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 22:36:33 +00:00
msdkdec: avoid early destruction of frame in dynamic resolution change
In cases where we do hard resest, the current code destroys the frame which has new resolution bit early and this causes buffer_unmap warnings. Keep an extra ref to the frame internally to avoid this.
This commit is contained in:
parent
1250af8f09
commit
d63a1b4e3f
1 changed files with 6 additions and 0 deletions
|
@ -922,6 +922,12 @@ gst_msdkdec_handle_frame (GstVideoDecoder * decoder, GstVideoCodecFrame * frame)
|
|||
if (thiz->force_reset_on_res_change)
|
||||
hard_reset = TRUE;
|
||||
|
||||
/* Config changed dynamically and we are going to do a full reset,
|
||||
* this will unref the input frame which has the new configuration.
|
||||
* Keep a ref to the input_frame to keep it alive */
|
||||
if (thiz->initialized && thiz->do_renego)
|
||||
gst_video_codec_frame_ref (frame);
|
||||
|
||||
gst_msdkdec_negotiate (thiz, hard_reset);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue