diff --git a/sys/va/gstvaav1dec.c b/sys/va/gstvaav1dec.c index 6616a0c7e4..8afd91c70a 100644 --- a/sys/va/gstvaav1dec.c +++ b/sys/va/gstvaav1dec.c @@ -112,8 +112,8 @@ gst_va_av1_dec_negotiate (GstVideoDecoder * decoder) if (!gst_va_decoder_open (base->decoder, base->profile, base->rt_format)) return FALSE; - if (!gst_va_decoder_set_format (base->decoder, self->max_width, - self->max_height, NULL)) + if (!gst_va_decoder_set_frame_size (base->decoder, self->max_width, + self->max_height)) return FALSE; } diff --git a/sys/va/gstvadecoder.c b/sys/va/gstvadecoder.c index 14ef2ba20e..3993a32e1b 100644 --- a/sys/va/gstvadecoder.c +++ b/sys/va/gstvadecoder.c @@ -296,8 +296,8 @@ gst_va_decoder_close (GstVaDecoder * self) } gboolean -gst_va_decoder_set_format (GstVaDecoder * self, gint coded_width, - gint coded_height, GArray * surfaces) +gst_va_decoder_set_frame_size_with_surfaces (GstVaDecoder * self, + gint coded_width, gint coded_height, GArray * surfaces) { VAContextID context; VADisplay dpy; @@ -310,7 +310,7 @@ gst_va_decoder_set_format (GstVaDecoder * self, gint coded_width, GST_OBJECT_LOCK (self); if (self->context != VA_INVALID_ID) { GST_OBJECT_UNLOCK (self); - GST_INFO_OBJECT (self, "decoder already has a format"); + GST_INFO_OBJECT (self, "decoder already has a context"); return TRUE; } GST_OBJECT_UNLOCK (self); @@ -346,6 +346,14 @@ gst_va_decoder_set_format (GstVaDecoder * self, gint coded_width, return TRUE; } +gboolean +gst_va_decoder_set_frame_size (GstVaDecoder * self, gint coded_width, + gint coded_height) +{ + return gst_va_decoder_set_frame_size_with_surfaces (self, coded_width, + coded_height, NULL); +} + gboolean gst_va_decoder_change_resolution (GstVaDecoder * self, gint coded_width, gint coded_height) diff --git a/sys/va/gstvadecoder.h b/sys/va/gstvadecoder.h index 7fadd26445..3b91f33c13 100644 --- a/sys/va/gstvadecoder.h +++ b/sys/va/gstvadecoder.h @@ -44,10 +44,14 @@ gboolean gst_va_decoder_open (GstVaDecoder * self, guint rt_format); gboolean gst_va_decoder_close (GstVaDecoder * self); gboolean gst_va_decoder_is_open (GstVaDecoder * self); -gboolean gst_va_decoder_set_format (GstVaDecoder * self, +gboolean gst_va_decoder_set_frame_size_with_surfaces + (GstVaDecoder * self, gint coded_width, gint coded_height, GArray * surfaces); +gboolean gst_va_decoder_set_frame_size (GstVaDecoder * self, + gint coded_width, + gint coded_height); gboolean gst_va_decoder_change_resolution (GstVaDecoder * self, gint coded_width, gint coded_height); diff --git a/sys/va/gstvah264dec.c b/sys/va/gstvah264dec.c index 69535a1b1a..bb4b2c77a3 100644 --- a/sys/va/gstvah264dec.c +++ b/sys/va/gstvah264dec.c @@ -815,8 +815,8 @@ gst_va_h264_dec_negotiate (GstVideoDecoder * decoder) if (!gst_va_decoder_open (base->decoder, base->profile, base->rt_format)) return FALSE; - if (!gst_va_decoder_set_format (base->decoder, self->coded_width, - self->coded_height, NULL)) + if (!gst_va_decoder_set_frame_size (base->decoder, self->coded_width, + self->coded_height)) return FALSE; if (base->output_state) diff --git a/sys/va/gstvah265dec.c b/sys/va/gstvah265dec.c index bff3a975cd..63f50be6a1 100644 --- a/sys/va/gstvah265dec.c +++ b/sys/va/gstvah265dec.c @@ -1198,8 +1198,8 @@ gst_va_h265_dec_negotiate (GstVideoDecoder * decoder) if (!gst_va_decoder_open (base->decoder, base->profile, base->rt_format)) return FALSE; - if (!gst_va_decoder_set_format (base->decoder, self->coded_width, - self->coded_height, NULL)) + if (!gst_va_decoder_set_frame_size (base->decoder, self->coded_width, + self->coded_height)) return FALSE; if (base->output_state) diff --git a/sys/va/gstvampeg2dec.c b/sys/va/gstvampeg2dec.c index 426eb0e743..6fe0169f03 100644 --- a/sys/va/gstvampeg2dec.c +++ b/sys/va/gstvampeg2dec.c @@ -105,8 +105,7 @@ gst_va_mpeg2_dec_negotiate (GstVideoDecoder * decoder) if (!gst_va_decoder_open (base->decoder, base->profile, base->rt_format)) return FALSE; - if (!gst_va_decoder_set_format (base->decoder, base->width, - base->height, NULL)) + if (!gst_va_decoder_set_frame_size (base->decoder, base->width, base->height)) return FALSE; if (base->output_state) diff --git a/sys/va/gstvavp8dec.c b/sys/va/gstvavp8dec.c index b8cf57bf85..d9b266b659 100644 --- a/sys/va/gstvavp8dec.c +++ b/sys/va/gstvavp8dec.c @@ -104,8 +104,7 @@ gst_va_vp8_dec_negotiate (GstVideoDecoder * decoder) if (!gst_va_decoder_open (base->decoder, base->profile, base->rt_format)) return FALSE; - if (!gst_va_decoder_set_format (base->decoder, base->width, base->height, - NULL)) + if (!gst_va_decoder_set_frame_size (base->decoder, base->width, base->height)) return FALSE; if (base->output_state) diff --git a/sys/va/gstvavp9dec.c b/sys/va/gstvavp9dec.c index 606938f17f..d12fbc9df3 100644 --- a/sys/va/gstvavp9dec.c +++ b/sys/va/gstvavp9dec.c @@ -575,8 +575,8 @@ gst_va_vp9_dec_negotiate (GstVideoDecoder * decoder) if (!gst_va_decoder_open (base->decoder, base->profile, base->rt_format)) return FALSE; - if (!gst_va_decoder_set_format (base->decoder, base->width, base->height, - NULL)) + if (!gst_va_decoder_set_frame_size (base->decoder, base->width, + base->height)) return FALSE; }