summaryrefslogtreecommitdiffstats
path: root/sys/vdpau
diff options
context:
space:
mode:
authorCarl-Anton Ingmarsson <ca.ingmarsson@gmail.com>2009-04-15 23:49:07 +0200
committerJan Schmidt <thaytan@noraisin.net>2009-06-20 15:21:29 +0100
commit7ca750c4229e1535deb3817687deefce9d4f9b42 (patch)
tree33afee88ca819383f856ff29808abefc9c10ac29 /sys/vdpau
parent000db36020bd6d31160bd0eb38ad27bb9687400a (diff)
downloadgst-plugins-bad-7ca750c4229e1535deb3817687deefce9d4f9b42.tar.gz
gst-plugins-bad-7ca750c4229e1535deb3817687deefce9d4f9b42.tar.bz2
gst-plugins-bad-7ca750c4229e1535deb3817687deefce9d4f9b42.zip
vdpaumpegdec: fixup GstFlowReturn propagation a bit
Diffstat (limited to 'sys/vdpau')
-rw-r--r--sys/vdpau/gstvdpmpegdecoder.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/vdpau/gstvdpmpegdecoder.c b/sys/vdpau/gstvdpmpegdecoder.c
index 053cf1c0..9b4aa99d 100644
--- a/sys/vdpau/gstvdpmpegdecoder.c
+++ b/sys/vdpau/gstvdpmpegdecoder.c
@@ -307,6 +307,7 @@ gst_vdp_mpeg_decoder_chain (GstPad * pad, GstBuffer * buffer)
GstVdpMpegDecoder *mpeg_dec;
guint8 *data, *end;
guint32 sync_word = 0xffffffff;
+ GstFlowReturn ret = GST_FLOW_OK;
mpeg_dec = GST_VDPAU_MPEG_DECODER (GST_OBJECT_PARENT (pad));
@@ -338,10 +339,9 @@ gst_vdp_mpeg_decoder_chain (GstPad * pad, GstBuffer * buffer)
switch (data[0]) {
case MPEG_PACKET_PICTURE:
GST_DEBUG_OBJECT (mpeg_dec, "MPEG_PACKET_PICTURE");
- if (mpeg_dec->vdp_info.slice_count > 0) {
- if (gst_vdp_mpeg_decoder_decode (mpeg_dec) != GST_FLOW_OK)
- return GST_FLOW_ERROR;
- }
+ if (mpeg_dec->vdp_info.slice_count > 0)
+ ret = gst_vdp_mpeg_decoder_decode (mpeg_dec);
+
gst_vdp_mpeg_decoder_parse_picture (mpeg_dec, packet_start, packet_end);
break;
case MPEG_PACKET_SEQUENCE:
@@ -374,7 +374,7 @@ gst_vdp_mpeg_decoder_chain (GstPad * pad, GstBuffer * buffer)
}
}
- return GST_FLOW_OK;
+ return ret;
}
/* GObject vmethod implementations */