From 0180ef635c53a9ed062cde7040be3a3971379e9a Mon Sep 17 00:00:00 2001 From: Gwenole Beauchesne Date: Tue, 8 Jan 2013 16:41:44 +0100 Subject: [PATCH] mpeg2: drop useless gst_adapter_peek(). Drop useless gst_adapter_peek() since the returned buffer was not used and this could incur superfluous memcpy(). --- gst-libs/gst/vaapi/gstvaapidecoder_mpeg2.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_mpeg2.c b/gst-libs/gst/vaapi/gstvaapidecoder_mpeg2.c index 86daa44e28..784618c325 100644 --- a/gst-libs/gst/vaapi/gstvaapidecoder_mpeg2.c +++ b/gst-libs/gst/vaapi/gstvaapidecoder_mpeg2.c @@ -1308,7 +1308,6 @@ gst_vaapi_decoder_mpeg2_parse(GstVaapiDecoder *base_decoder, GstVaapiParserState * const ps = GST_VAAPI_PARSER_STATE(base_decoder); GstVaapiDecoderStatus status; GstMpegVideoPacketTypeCode type; - const guchar *buf; guint32 start_code; guint size, buf_size, flags; gint ofs, ofs2; @@ -1347,10 +1346,6 @@ gst_vaapi_decoder_mpeg2_parse(GstVaapiDecoder *base_decoder, buf_size = ofs; ps->input_offset2 = 0; - buf = gst_adapter_peek(adapter, buf_size); - if (!buf) - return GST_VAAPI_DECODER_STATUS_ERROR_NO_DATA; - unit->size = buf_size; type = start_code & 0xff;