diff options
author | Carl-Anton Ingmarsson <ca.ingmarsson@gmail.com> | 2010-06-17 15:20:03 +0200 |
---|---|---|
committer | Carl-Anton Ingmarsson <ca.ingmarsson@gmail.com> | 2010-06-23 21:51:53 +0200 |
commit | 80749da1668bf93b73fdb4c54b7b2834ff4fa19b (patch) | |
tree | ae39e545ff156fe63290bbd3c471bdfb11a3ac84 /sys/vdpau/mpeg/gstvdpmpegdec.c | |
parent | f8846a463d86c7bf8290c4aadc258835e863212f (diff) | |
download | gstreamer-plugins-bad-80749da1668bf93b73fdb4c54b7b2834ff4fa19b.tar.gz |
vdpau: change gst_vdp_video_src_pad_get_device behaviour
it now creates the device if it's not available
Diffstat (limited to 'sys/vdpau/mpeg/gstvdpmpegdec.c')
-rw-r--r-- | sys/vdpau/mpeg/gstvdpmpegdec.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sys/vdpau/mpeg/gstvdpmpegdec.c b/sys/vdpau/mpeg/gstvdpmpegdec.c index b2d77706f..f31870432 100644 --- a/sys/vdpau/mpeg/gstvdpmpegdec.c +++ b/sys/vdpau/mpeg/gstvdpmpegdec.c @@ -245,12 +245,14 @@ gst_vdp_mpeg_dec_handle_quant_matrix (GstVdpMpegDec * mpeg_dec, static gboolean gst_vdp_mpeg_dec_create_decoder (GstVdpMpegDec * mpeg_dec) { + GstFlowReturn ret; GstVdpDevice *device; - device = gst_vdp_video_src_pad_get_device - (GST_VDP_VIDEO_SRC_PAD (GST_BASE_VIDEO_DECODER_SRC_PAD (mpeg_dec))); + ret = gst_vdp_video_src_pad_get_device + (GST_VDP_VIDEO_SRC_PAD (GST_BASE_VIDEO_DECODER_SRC_PAD (mpeg_dec)), + &device, NULL); - if (device) { + if (ret == GST_FLOW_OK) { VdpStatus status; GstVdpMpegStreamInfo *stream_info; @@ -722,13 +724,15 @@ gst_vdp_mpeg_dec_stop (GstBaseVideoDecoder * base_video_decoder) GstVdpMpegDec *mpeg_dec = GST_VDP_MPEG_DEC (base_video_decoder); GstVdpVideoSrcPad *vdp_pad; + GstFlowReturn ret; GstVdpDevice *device; vdp_pad = GST_VDP_VIDEO_SRC_PAD (GST_BASE_VIDEO_DECODER_SRC_PAD (base_video_decoder)); - if ((device = gst_vdp_video_src_pad_get_device (vdp_pad))) { + ret = gst_vdp_video_src_pad_get_device (vdp_pad, &device, NULL); + if (ret == GST_FLOW_OK) { if (mpeg_dec->decoder != VDP_INVALID_HANDLE) device->vdp_decoder_destroy (mpeg_dec->decoder); |