diff options
author | Rainer Hochecker <fernetmenta@online.de> | 2014-03-06 14:40:43 +0100 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2014-03-06 19:28:20 +0100 |
commit | b66382101cff33e2ce66500327a90d0a105eedeb (patch) | |
tree | e7300f41647c70ff71aaf1445086ca9cc0a6fb5a /libavcodec | |
parent | 5b977c1d4fd99f325049d48fb8f0a3240d50eef8 (diff) | |
download | ffmpeg-b66382101cff33e2ce66500327a90d0a105eedeb.tar.gz |
dxva2: Increase maximum number of slices for mpeg2
Some content requires an higher number of slices in order to
render properly.
Rise the number to 1024 and warn if ever it exceeds.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/dxva2_mpeg2.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/libavcodec/dxva2_mpeg2.c b/libavcodec/dxva2_mpeg2.c index 049fa48be7..e0b2efa927 100644 --- a/libavcodec/dxva2_mpeg2.c +++ b/libavcodec/dxva2_mpeg2.c @@ -20,9 +20,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "libavutil/log.h" #include "dxva2_internal.h" -#define MAX_SLICES (SLICE_MAX_START_CODE - SLICE_MIN_START_CODE + 1) +#define MAX_SLICES 1024 struct dxva2_picture_context { DXVA_PictureParameters pp; DXVA_QmatrixData qm; @@ -233,9 +234,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; |