diff options
author | Eric Hameleers <alien@slackware.com> | 2018-01-24 11:16:15 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2018-01-24 11:16:15 +0000 |
commit | 84318e3b36fa2930bf74e40c61bd1c2e651a8b3f (patch) | |
tree | f09882ca4a9c1ec36f3cbe11f15f513af134a254 /vlc/build/patches | |
parent | caa53c44249d8b146dd25cbd19240b2d32503801 (diff) | |
download | asb-84318e3b36fa2930bf74e40c61bd1c2e651a8b3f.tar.gz asb-84318e3b36fa2930bf74e40c61bd1c2e651a8b3f.tar.xz |
vlc: ffmpeg: fix crash on bogus frame reference in MPEG-2 with DXVA
Diffstat (limited to 'vlc/build/patches')
-rw-r--r-- | vlc/build/patches/ffmpeg_dxva_vc1_crash.patch | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/vlc/build/patches/ffmpeg_dxva_vc1_crash.patch b/vlc/build/patches/ffmpeg_dxva_vc1_crash.patch index ebeb7c53..791367fa 100644 --- a/vlc/build/patches/ffmpeg_dxva_vc1_crash.patch +++ b/vlc/build/patches/ffmpeg_dxva_vc1_crash.patch @@ -1,6 +1,3 @@ -Source: http://git.videolan.org/?p=vlc/vlc-3.0.git;a=blob;f=contrib/src/ffmpeg/dxva_vc1_crash.patch -ffmpeg: fix crash in DVXA in interlaced VC-1 - --- ffmpeg/libavcodec/dxva2_vc1.c 2017-12-19 14:46:36.070857200 +0100 +++ ffmpeg/libavcodec/dxva2_vc1.c.refcrash 2017-12-19 14:36:57.157973200 +0100 @@ -58,11 +58,11 @@ static void fill_picture_parameters(AVCo @@ -17,3 +14,20 @@ ffmpeg: fix crash in DVXA in interlaced VC-1 pp->wBackwardRefPictureIndex = ff_dxva2_get_surface_index(avctx, ctx, s->next_picture.f); else pp->wBackwardRefPictureIndex = 0xffff; +--- ffmpeg/libavcodec/dxva2_mpeg2.c 2018-01-23 12:58:14.672161600 +0100 ++++ ffmpeg/libavcodec/dxva2_mpeg2.c.ref 2018-01-23 12:56:45.439743300 +0100 +@@ -51,11 +51,11 @@ static void fill_picture_parameters(AVCo + memset(pp, 0, sizeof(*pp)); + pp->wDecodedPictureIndex = ff_dxva2_get_surface_index(avctx, ctx, current_picture->f); + pp->wDeblockedPictureIndex = 0; +- if (s->pict_type != AV_PICTURE_TYPE_I) ++ if (s->pict_type != AV_PICTURE_TYPE_I && s->last_picture.f->data[0]) + pp->wForwardRefPictureIndex = ff_dxva2_get_surface_index(avctx, ctx, s->last_picture.f); + else + pp->wForwardRefPictureIndex = 0xffff; +- if (s->pict_type == AV_PICTURE_TYPE_B) ++ if (s->pict_type == AV_PICTURE_TYPE_B && s->next_picture.f->data[0]) + pp->wBackwardRefPictureIndex = ff_dxva2_get_surface_index(avctx, ctx, s->next_picture.f); + else + pp->wBackwardRefPictureIndex = 0xffff; + |