summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/vdpau/decode.c
diff options
context:
space:
mode:
authorThomas Balling Sørensen <tball@tball-laptop.(none)>2010-10-06 00:19:53 +0200
committerThomas Balling Sørensen <tball@tball-laptop.(none)>2010-10-06 00:19:53 +0200
commitd0e203f1f00b0f760acc7fab07cd7ce8cca34000 (patch)
tree8a7bff0e40d3b1da6bb9e7f6f92a7c9adae647bf /src/gallium/state_trackers/vdpau/decode.c
parent7d9e070b0d9948297d599fd148313bc3a900dfa3 (diff)
vl: initial commit of the bitstream parser
Diffstat (limited to 'src/gallium/state_trackers/vdpau/decode.c')
-rw-r--r--src/gallium/state_trackers/vdpau/decode.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/gallium/state_trackers/vdpau/decode.c b/src/gallium/state_trackers/vdpau/decode.c
index 3e7cb4a3cab..03764a7f33d 100644
--- a/src/gallium/state_trackers/vdpau/decode.c
+++ b/src/gallium/state_trackers/vdpau/decode.c
@@ -211,11 +211,19 @@ vlVdpDecoderRenderMpeg2 (vlVdpDecoder *vldecoder,
ret = vlVdpCreateSurfaceTarget(vldecoder,t_vdp_surf);
- vlVdpBitstreamToMacroblock(vpipe->screen, bitstream_buffers,
- &num_macroblocks, &pipe_macroblocks);
+ if (vlVdpMPEG2BitstreamToMacroblock(vpipe->screen, bitstream_buffers, bitstream_buffer_count,
+ &num_macroblocks, &pipe_macroblocks))
+ {
+ debug_printf("[VDPAU] Error in frame-header. Skipping.\n");
+
+ ret = VDP_STATUS_OK;
+ goto skip_frame;
+ }
vpipe->set_decode_target(vpipe,t_surf);
- vpipe->decode_macroblocks(vpipe, p_surf, f_surf, num_macroblocks, pipe_macroblocks, NULL);
+ vpipe->decode_macroblocks(vpipe, p_surf, f_surf, num_macroblocks, (struct pipe_macroblock *)pipe_macroblocks, NULL);
+
+ skip_frame:
return ret;
}