diff options
author | Carl-Anton Ingmarsson <ca.ingmarsson@gmail.com> | 2009-04-13 21:23:38 +0200 |
---|---|---|
committer | Jan Schmidt <thaytan@noraisin.net> | 2009-06-20 15:21:27 +0100 |
commit | d2efd275a4f5c7ed853521ff9cb0e738a563b52e (patch) | |
tree | 23c25882318276700e1170404d30625a35f01d21 /sys | |
parent | 1234267cb5a66dd2782ac7755ef1f998f6561da4 (diff) | |
download | gst-plugins-bad-d2efd275a4f5c7ed853521ff9cb0e738a563b52e.tar.gz gst-plugins-bad-d2efd275a4f5c7ed853521ff9cb0e738a563b52e.tar.bz2 gst-plugins-bad-d2efd275a4f5c7ed853521ff9cb0e738a563b52e.zip |
vdpau: decode slices when we get the next picture header. MPEG2 now kindof works.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/vdpau/gstvdpaumpegdecoder.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/vdpau/gstvdpaumpegdecoder.c b/sys/vdpau/gstvdpaumpegdecoder.c index efa89e36..e13ec14c 100644 --- a/sys/vdpau/gstvdpaumpegdecoder.c +++ b/sys/vdpau/gstvdpaumpegdecoder.c @@ -211,7 +211,6 @@ gst_vdpau_mpeg_decoder_parse_picture_coding (GstVdpauMpegDecoder * mpeg_dec, info->intra_dc_precision = pic_ext.intra_dc_precision; info->picture_structure = pic_ext.picture_structure; - GST_DEBUG ("Picture structure %d", info->picture_structure); info->top_field_first = pic_ext.top_field_first; info->frame_pred_frame_dct = pic_ext.frame_pred_frame_dct; info->concealment_motion_vectors = pic_ext.concealment_motion_vectors; @@ -340,14 +339,15 @@ gst_vdpau_mpeg_decoder_chain (GstPad * pad, GstBuffer * buffer) gst_adapter_push (mpeg_dec->adapter, subbuf); mpeg_dec->vdp_info.slice_count++; } - } else if (mpeg_dec->vdp_info.slice_count > 0 && mpeg_dec->want_slice) { - if (gst_vdpau_mpeg_decoder_decode (mpeg_dec) != GST_FLOW_OK) - return GST_FLOW_ERROR; } 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 (gst_vdpau_mpeg_decoder_decode (mpeg_dec) != GST_FLOW_OK) + return GST_FLOW_ERROR; + } gst_vdpau_mpeg_decoder_parse_picture (mpeg_dec, packet_start, packet_end); break; |