summaryrefslogtreecommitdiffstats
path: root/sys/vdpau
diff options
context:
space:
mode:
authorCarl-Anton Ingmarsson <ca.ingmarsson@gmail.com>2009-04-14 19:08:53 +0200
committerJan Schmidt <thaytan@noraisin.net>2009-06-20 15:21:27 +0100
commit71c398566cf9f434d9a8fd7b98224c0e1f963910 (patch)
treeb60cf69002f44ad70815d5fe8a7d7eb370e12e9f /sys/vdpau
parent1af393a72d675ac59f06c5751fe60ce170f9e545 (diff)
downloadgst-plugins-bad-71c398566cf9f434d9a8fd7b98224c0e1f963910.tar.gz
gst-plugins-bad-71c398566cf9f434d9a8fd7b98224c0e1f963910.tar.bz2
gst-plugins-bad-71c398566cf9f434d9a8fd7b98224c0e1f963910.zip
vdpaumpegdecoder: remove unnecesary want_slice field
Diffstat (limited to 'sys/vdpau')
-rw-r--r--sys/vdpau/gstvdpmpegdecoder.c23
-rw-r--r--sys/vdpau/gstvdpmpegdecoder.h2
2 files changed, 7 insertions, 18 deletions
diff --git a/sys/vdpau/gstvdpmpegdecoder.c b/sys/vdpau/gstvdpmpegdecoder.c
index df8a5b67..350414a7 100644
--- a/sys/vdpau/gstvdpmpegdecoder.c
+++ b/sys/vdpau/gstvdpmpegdecoder.c
@@ -217,8 +217,6 @@ gst_vdp_mpeg_decoder_parse_picture_coding (GstVdpMpegDecoder * mpeg_dec,
info->q_scale_type = pic_ext.q_scale_type;
info->intra_vlc_format = pic_ext.intra_vlc_format;
- mpeg_dec->want_slice = TRUE;
-
return TRUE;
}
@@ -269,10 +267,7 @@ gst_vdp_mpeg_decoder_parse_picture (GstVdpMpegDecoder * mpeg_dec,
mpeg_dec->vdp_info.full_pel_backward_vector =
pic_hdr.full_pel_backward_vector;
memcpy (&mpeg_dec->vdp_info.f_code, &pic_hdr.f_code, 4);
-
- mpeg_dec->want_slice = TRUE;
- } else
- mpeg_dec->want_slice = FALSE;
+ }
return TRUE;
}
@@ -332,19 +327,17 @@ gst_vdp_mpeg_decoder_chain (GstPad * pad, GstBuffer * buffer)
GstBuffer *subbuf;
GST_DEBUG_OBJECT (mpeg_dec, "MPEG_PACKET_SLICE");
- if (mpeg_dec->want_slice) {
- subbuf =
- gst_buffer_create_sub (buffer,
- packet_start - GST_BUFFER_DATA (buffer), packet_end - packet_start);
- gst_adapter_push (mpeg_dec->adapter, subbuf);
- mpeg_dec->vdp_info.slice_count++;
- }
+ subbuf =
+ gst_buffer_create_sub (buffer,
+ packet_start - GST_BUFFER_DATA (buffer), packet_end - packet_start);
+ gst_adapter_push (mpeg_dec->adapter, subbuf);
+ mpeg_dec->vdp_info.slice_count++;
}
switch (data[0]) {
case MPEG_PACKET_PICTURE:
GST_DEBUG_OBJECT (mpeg_dec, "MPEG_PACKET_PICTURE");
- if (mpeg_dec->vdp_info.slice_count > 0 && mpeg_dec->want_slice) {
+ if (mpeg_dec->vdp_info.slice_count > 0) {
if (gst_vdp_mpeg_decoder_decode (mpeg_dec) != GST_FLOW_OK)
return GST_FLOW_ERROR;
}
@@ -445,8 +438,6 @@ gst_vdp_mpeg_decoder_init (GstVdpMpegDecoder * mpeg_dec,
mpeg_dec->adapter = gst_adapter_new ();
- mpeg_dec->want_slice = FALSE;
-
gst_pad_set_chain_function (dec->sink, gst_vdp_mpeg_decoder_chain);
}
diff --git a/sys/vdpau/gstvdpmpegdecoder.h b/sys/vdpau/gstvdpmpegdecoder.h
index dc90764b..b8f01bdf 100644
--- a/sys/vdpau/gstvdpmpegdecoder.h
+++ b/sys/vdpau/gstvdpmpegdecoder.h
@@ -46,8 +46,6 @@ struct _GstVdpMpegDecoder
VdpDecoder decoder;
VdpPictureInfoMPEG1Or2 vdp_info;
GstBuffer *f_buffer;
-
- gboolean want_slice;
GstAdapter *adapter;
gint slices;