mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 18:05:37 +00:00
codecs: vp9decoder: handle the show_frame check in base class
Same as vp8 decoder update https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1670 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1697>
This commit is contained in:
parent
0f5fc9646e
commit
a31a6608fe
2 changed files with 14 additions and 12 deletions
|
@ -385,10 +385,19 @@ gst_vp9_decoder_handle_frame (GstVideoDecoder * decoder,
|
|||
|
||||
gst_buffer_unmap (in_buf, &map);
|
||||
|
||||
g_assert (klass->output_picture);
|
||||
if (!picture->frame_hdr.show_frame) {
|
||||
GST_LOG_OBJECT (self, "Decode only picture %p", picture);
|
||||
GST_VIDEO_CODEC_FRAME_SET_DECODE_ONLY (frame);
|
||||
|
||||
/* transfer ownership of frame and picture */
|
||||
return klass->output_picture (self, frame, picture);
|
||||
gst_vp9_picture_unref (picture);
|
||||
|
||||
ret = gst_video_decoder_finish_frame (GST_VIDEO_DECODER (self), frame);
|
||||
} else {
|
||||
g_assert (klass->output_picture);
|
||||
ret = klass->output_picture (self, frame, picture);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
||||
unmap_and_error:
|
||||
{
|
||||
|
|
|
@ -472,6 +472,8 @@ gst_d3d11_vp9_dec_output_picture (GstVp9Decoder * decoder,
|
|||
GstBuffer *output_buffer = NULL;
|
||||
GstBuffer *view_buffer;
|
||||
|
||||
g_assert (picture->frame_hdr.show_frame);
|
||||
|
||||
GST_LOG_OBJECT (self, "Outputting picture %p", picture);
|
||||
|
||||
view_buffer = (GstBuffer *) gst_vp9_picture_get_user_data (picture);
|
||||
|
@ -481,15 +483,6 @@ gst_d3d11_vp9_dec_output_picture (GstVp9Decoder * decoder,
|
|||
goto error;
|
||||
}
|
||||
|
||||
if (!picture->frame_hdr.show_frame) {
|
||||
GST_LOG_OBJECT (self, "Decode only picture %p", picture);
|
||||
GST_VIDEO_CODEC_FRAME_SET_DECODE_ONLY (frame);
|
||||
|
||||
gst_vp9_picture_unref (picture);
|
||||
|
||||
return gst_video_decoder_finish_frame (vdec, frame);
|
||||
}
|
||||
|
||||
/* if downstream is d3d11 element and forward playback case,
|
||||
* expose our decoder view without copy. In case of reverse playback, however,
|
||||
* we cannot do that since baseclass will store the decoded buffer
|
||||
|
|
Loading…
Reference in a new issue