diff options
author | Carl-Anton Ingmarsson <ca.ingmarsson@gmail.com> | 2009-06-05 21:42:30 +0200 |
---|---|---|
committer | Jan Schmidt <thaytan@noraisin.net> | 2009-06-20 15:21:44 +0100 |
commit | 5956df5338d0f3f3763bd8aa9e0e4b7b501a8469 (patch) | |
tree | 72b473388bc5c186f427b3c8863a740a207c0075 /sys | |
parent | 7c0e5b5c22e0556567978d13b2c00b9c758d3513 (diff) |
vdpaumpegdec: pass buffer size directly to gst_vdp_mpeg_decoder_decode
Diffstat (limited to 'sys')
-rw-r--r-- | sys/vdpau/gstvdpmpegdecoder.c | 8 | ||||
-rw-r--r-- | sys/vdpau/gstvdpmpegdecoder.h | 1 |
2 files changed, 4 insertions, 5 deletions
diff --git a/sys/vdpau/gstvdpmpegdecoder.c b/sys/vdpau/gstvdpmpegdecoder.c index da4f63ecd..6968c3479 100644 --- a/sys/vdpau/gstvdpmpegdecoder.c +++ b/sys/vdpau/gstvdpmpegdecoder.c @@ -329,7 +329,7 @@ gst_vdp_mpeg_decoder_push_video_buffer (GstVdpMpegDecoder * mpeg_dec, static GstFlowReturn gst_vdp_mpeg_decoder_decode (GstVdpMpegDecoder * mpeg_dec, - GstClockTime timestamp) + GstClockTime timestamp, gint64 size) { VdpPictureInfoMPEG1Or2 *info; GstBuffer *buffer; @@ -367,7 +367,7 @@ gst_vdp_mpeg_decoder_decode (GstVdpMpegDecoder * mpeg_dec, GST_BUFFER_TIMESTAMP (outbuf) = timestamp; GST_BUFFER_DURATION (outbuf) = mpeg_dec->duration; GST_BUFFER_OFFSET (outbuf) = mpeg_dec->frame_nr; - GST_BUFFER_SIZE (outbuf) = mpeg_dec->size; + GST_BUFFER_SIZE (outbuf) = size; if (info->top_field_first) GST_BUFFER_FLAG_SET (outbuf, GST_VIDEO_BUFFER_TFF); @@ -608,7 +608,6 @@ gst_vdp_mpeg_decoder_chain (GstPad * pad, GstBuffer * buffer) gst_vdp_mpeg_decoder_flush (mpeg_dec); } - mpeg_dec->size = GST_BUFFER_SIZE (buffer); gst_vdp_mpeg_packetizer_init (&packetizer, buffer); while ((buf = gst_vdp_mpeg_packetizer_get_next_packet (&packetizer))) { GstBitReader b_reader = GST_BIT_READER_INIT_FROM_BUFFER (buf); @@ -676,7 +675,8 @@ gst_vdp_mpeg_decoder_chain (GstPad * pad, GstBuffer * buffer) } if (mpeg_dec->vdp_info.slice_count > 0) - ret = gst_vdp_mpeg_decoder_decode (mpeg_dec, GST_BUFFER_TIMESTAMP (buffer)); + ret = gst_vdp_mpeg_decoder_decode (mpeg_dec, GST_BUFFER_TIMESTAMP (buffer), + GST_BUFFER_SIZE (buffer)); return ret; } diff --git a/sys/vdpau/gstvdpmpegdecoder.h b/sys/vdpau/gstvdpmpegdecoder.h index 3cd521baf..e13008627 100644 --- a/sys/vdpau/gstvdpmpegdecoder.h +++ b/sys/vdpau/gstvdpmpegdecoder.h @@ -59,7 +59,6 @@ struct _GstVdpMpegDecoder /* currently decoded frame info */ GstAdapter *adapter; VdpPictureInfoMPEG1Or2 vdp_info; - guint64 size; guint64 frame_nr; GstClockTime duration; |