diff options
author | Alexander Kanavin <alexander.kanavin@linux.intel.com> | 2015-05-18 17:12:47 +0300 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2015-05-22 20:14:07 +0200 |
commit | 175406cdca39bf5b218bb4127a3e9c9bd11b653f (patch) | |
tree | 1efd8f8282fb774dbd8d3ba8e912d57cbdbfed13 /meta-multimedia/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avcodec-parser-reset-indexes-on-realloc-failure.patch | |
parent | 2b79eeb404af36cffb3f12097175556e5819a88d (diff) | |
download | meta-openembedded-contrib-175406cdca39bf5b218bb4127a3e9c9bd11b653f.tar.gz |
recipes-multimedia: add gstreamer-0.10 recipes
So that they can be removed from oe-core
https://bugzilla.yoctoproject.org/show_bug.cgi?id=6294
Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-multimedia/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avcodec-parser-reset-indexes-on-realloc-failure.patch')
-rw-r--r-- | meta-multimedia/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avcodec-parser-reset-indexes-on-realloc-failure.patch | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/meta-multimedia/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avcodec-parser-reset-indexes-on-realloc-failure.patch b/meta-multimedia/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avcodec-parser-reset-indexes-on-realloc-failure.patch new file mode 100644 index 0000000000..5ff65834e4 --- /dev/null +++ b/meta-multimedia/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-avcodec-parser-reset-indexes-on-realloc-failure.patch @@ -0,0 +1,50 @@ +gst-ffmpeg: avcodec/parser: reset indexes on realloc failure + +Fixes Ticket2982 + +Signed-off-by: Michael Niedermayer <michaelni@gmx.at> +(cherry picked from commit f31011e9abfb2ae75bb32bc44e2c34194c8dc40a) + +Signed-off-by: Michael Niedermayer <michaelni@gmx.at> + +Upstream-Status: Backport + +Signed-off-by: Yue Tao <yue.tao@windriver.com> + +--- + libavcodec/parser.c | 10 +++++++--- + 1 files changed, 7 insertions(+), 3 deletions(-) + +diff --git a/libavcodec/parser.c b/libavcodec/parser.c +index 2c6de6e..66eca06 100644 +--- a/gst-libs/ext/libav/libavcodec/parser.c ++++ b/gst-libs/ext/libav/libavcodec/parser.c +@@ -241,8 +241,10 @@ int ff_combine_frame(ParseContext *pc, int next, const uint8_t **buf, int *buf_s + if(next == END_NOT_FOUND){ + void* new_buffer = av_fast_realloc(pc->buffer, &pc->buffer_size, (*buf_size) + pc->index + FF_INPUT_BUFFER_PADDING_SIZE); + +- if(!new_buffer) ++ if(!new_buffer) { ++ pc->index = 0; + return AVERROR(ENOMEM); ++ } + pc->buffer = new_buffer; + memcpy(&pc->buffer[pc->index], *buf, *buf_size); + pc->index += *buf_size; +@@ -255,9 +257,11 @@ int ff_combine_frame(ParseContext *pc, int next, const uint8_t **buf, int *buf_s + /* append to buffer */ + if(pc->index){ + void* new_buffer = av_fast_realloc(pc->buffer, &pc->buffer_size, next + pc->index + FF_INPUT_BUFFER_PADDING_SIZE); +- +- if(!new_buffer) ++ if(!new_buffer) { ++ pc->overread_index = ++ pc->index = 0; + return AVERROR(ENOMEM); ++ } + pc->buffer = new_buffer; + if (next > -FF_INPUT_BUFFER_PADDING_SIZE) + memcpy(&pc->buffer[pc->index], *buf, +-- +1.7.5.4 + |