Commit b7c1f6f9 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit 'b6638210'

* commit 'b6638210':
  dxva2: Increase maximum number of slices for mpeg2

See: bceeccc6Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 39f5003a b6638210
......@@ -20,6 +20,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "libavutil/log.h"
#include "dxva2_internal.h"
#define MAX_SLICES 1024
......@@ -232,9 +233,11 @@ static int dxva2_mpeg2_decode_slice(AVCodecContext *avctx,
s->current_picture_ptr->hwaccel_picture_private;
unsigned position;
if (ctx_pic->slice_count >= MAX_SLICES)
if (ctx_pic->slice_count >= MAX_SLICES) {
avpriv_request_sample(avctx, "%d slices in dxva2",
ctx_pic->slice_count);
return -1;
}
if (!ctx_pic->bitstream)
ctx_pic->bitstream = buffer;
ctx_pic->bitstream_size += size;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment