summaryrefslogtreecommitdiffstats
path: root/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-huffyuvdec-Skip-len-0-cases.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-huffyuvdec-Skip-len-0-cases.patch')
-rw-r--r--meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-huffyuvdec-Skip-len-0-cases.patch61
1 files changed, 61 insertions, 0 deletions
diff --git a/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-huffyuvdec-Skip-len-0-cases.patch b/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-huffyuvdec-Skip-len-0-cases.patch
new file mode 100644
index 000000000..94bf4b6fb
--- /dev/null
+++ b/meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg-0.10.13/0001-huffyuvdec-Skip-len-0-cases.patch
@@ -0,0 +1,61 @@
1From db0f7f7394e1f994ed38db043f78ed0f10bde0da Mon Sep 17 00:00:00 2001
2From: Michael Niedermayer <michaelni@gmx.at>
3Date: Tue, 29 Jan 2013 19:22:33 +0100
4Subject: [PATCH] huffyuvdec: Skip len==0 cases
5
6Upstream-Status: Backport
7
8Commit db0f7f7394e1f994ed38db043f78ed0f10bde0da release/1.0
9
10Fixes vlc decoding for hypothetical files that would contain such cases.
11
12Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13(cherry picked from commit 0dfc01c2bbf4b71bb56201bc4a393321e15d1b31)
14
15Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
16---
17 libavcodec/huffyuv.c | 10 +++++-----
18 1 file changed, 5 insertions(+), 5 deletions(-)
19
20diff --git a/libavcodec/huffyuv.c b/libavcodec/huffyuv.c
21index 993e524..72ed351 100644
22--- a/gst-libs/ext/libav/libavcodec/huffyuv.c
23+++ b/gst-libs/ext/libav/libavcodec/huffyuv.c
24@@ -281,11 +281,11 @@ static void generate_joint_tables(HYuvCo
25 for(i=y=0; y<256; y++){
26 int len0 = s->len[0][y];
27 int limit = VLC_BITS - len0;
28- if(limit <= 0)
29+ if(limit <= 0 || !len0)
30 continue;
31 for(u=0; u<256; u++){
32 int len1 = s->len[p][u];
33- if(len1 > limit)
34+ if (len1 > limit || !len1)
35 continue;
36 len[i] = len0 + len1;
37 bits[i] = (s->bits[0][y] << len1) + s->bits[p][u];
38@@ -308,17 +308,17 @@ static void generate_joint_tables(HYuvCo
39 for(i=0, g=-16; g<16; g++){
40 int len0 = s->len[p0][g&255];
41 int limit0 = VLC_BITS - len0;
42- if(limit0 < 2)
43+ if (limit0 < 2 || !len0)
44 continue;
45 for(b=-16; b<16; b++){
46 int len1 = s->len[p1][b&255];
47 int limit1 = limit0 - len1;
48- if(limit1 < 1)
49+ if (limit1 < 1 || !len1)
50 continue;
51 code = (s->bits[p0][g&255] << len1) + s->bits[p1][b&255];
52 for(r=-16; r<16; r++){
53 int len2 = s->len[2][r&255];
54- if(len2 > limit1)
55+ if (len2 > limit1 || !len2)
56 continue;
57 len[i] = len0 + len1 + len2;
58 bits[i] = (code << len2) + s->bits[2][r&255];
59--
601.8.5.2.233.g932f7e4
61