[vlc-commits] contrib:ffmpeg: fix crash in DVXA in interlaced VC-1
Steve Lhomme
git at videolan.org
Thu Dec 21 10:52:58 CET 2017
vlc/vlc-3.0 | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Tue Dec 19 14:51:26 2017 +0100| [d0e599dd298b0cc61b4045fb468d9e38b766a6ff] | committer: Jean-Baptiste Kempf
contrib:ffmpeg: fix crash in DVXA in interlaced VC-1
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
(cherry picked from commit 83950bc4c002376945a32d27d5fd162fa8d251a6)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=d0e599dd298b0cc61b4045fb468d9e38b766a6ff
---
contrib/src/ffmpeg/dxva_vc1_crash.patch | 16 ++++++++++++++++
contrib/src/ffmpeg/rules.mak | 1 +
2 files changed, 17 insertions(+)
diff --git a/contrib/src/ffmpeg/dxva_vc1_crash.patch b/contrib/src/ffmpeg/dxva_vc1_crash.patch
new file mode 100644
index 0000000000..2fecce0881
--- /dev/null
+++ b/contrib/src/ffmpeg/dxva_vc1_crash.patch
@@ -0,0 +1,16 @@
+--- 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
+ memset(pp, 0, sizeof(*pp));
+ pp->wDecodedPictureIndex =
+ pp->wDeblockedPictureIndex = ff_dxva2_get_surface_index(avctx, ctx, current_picture->f);
+- if (s->pict_type != AV_PICTURE_TYPE_I && !v->bi_type)
++ if (s->pict_type != AV_PICTURE_TYPE_I && !v->bi_type && 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 && !v->bi_type)
++ if (s->pict_type == AV_PICTURE_TYPE_B && !v->bi_type && s->next_picture.f->data[0])
+ pp->wBackwardRefPictureIndex = ff_dxva2_get_surface_index(avctx, ctx, s->next_picture.f);
+ else
+ pp->wBackwardRefPictureIndex = 0xffff;
diff --git a/contrib/src/ffmpeg/rules.mak b/contrib/src/ffmpeg/rules.mak
index e99d9dfb7c..d88cefd5b4 100644
--- a/contrib/src/ffmpeg/rules.mak
+++ b/contrib/src/ffmpeg/rules.mak
@@ -231,6 +231,7 @@ ffmpeg: ffmpeg-$(FFMPEG_BASENAME).tar.xz .sum-ffmpeg
tar xvJf "$<" --strip-components=1 -C $@-$(FFMPEG_BASENAME)
ifdef USE_FFMPEG
$(APPLY) $(SRC)/ffmpeg/armv7_fixup.patch
+ $(APPLY) $(SRC)/ffmpeg/dxva_vc1_crash.patch
endif
ifdef USE_LIBAV
$(APPLY) $(SRC)/ffmpeg/libav_gsm.patch
More information about the vlc-commits
mailing list