mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
ext/ffmpeg/gstffmpegcodecmap.c: Pad codec data buffer to a size that is a multiple of 16, which ffmpeg apparently nee...
Original commit message from CVS: * ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_caps_with_codecid): Pad codec data buffer to a size that is a multiple of 16, which ffmpeg apparently needs for optimized/unchecked access to the data. Fixes crashes with HD h264 video.
This commit is contained in:
parent
e72a376411
commit
1df8496ffa
2 changed files with 8 additions and 1 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2006-01-26 Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
||||||
|
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_caps_with_codecid):
|
||||||
|
Pad codec data buffer to a size that is a multiple of 16, which
|
||||||
|
ffmpeg apparently needs for optimized/unchecked access to the
|
||||||
|
data. Fixes crashes with HD h264 video.
|
||||||
|
|
||||||
2006-01-23 Edward Hervey <edward@fluendo.com>
|
2006-01-23 Edward Hervey <edward@fluendo.com>
|
||||||
|
|
||||||
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_codecid_to_caps):
|
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_codecid_to_caps):
|
||||||
|
|
|
@ -1284,7 +1284,7 @@ gst_ffmpeg_caps_with_codecid (enum CodecID codec_id,
|
||||||
/* extradata parsing (esds [mpeg4], wma/wmv, msmpeg4v1/2/3, etc.) */
|
/* extradata parsing (esds [mpeg4], wma/wmv, msmpeg4v1/2/3, etc.) */
|
||||||
if ((value = gst_structure_get_value (str, "codec_data"))) {
|
if ((value = gst_structure_get_value (str, "codec_data"))) {
|
||||||
buf = GST_BUFFER (gst_value_get_mini_object (value));
|
buf = GST_BUFFER (gst_value_get_mini_object (value));
|
||||||
context->extradata = av_mallocz (GST_BUFFER_SIZE (buf));
|
context->extradata = av_mallocz (GST_ROUND_UP_16 (GST_BUFFER_SIZE (buf)));
|
||||||
memcpy (context->extradata, GST_BUFFER_DATA (buf),
|
memcpy (context->extradata, GST_BUFFER_DATA (buf),
|
||||||
GST_BUFFER_SIZE (buf));
|
GST_BUFFER_SIZE (buf));
|
||||||
context->extradata_size = GST_BUFFER_SIZE (buf);
|
context->extradata_size = GST_BUFFER_SIZE (buf);
|
||||||
|
|
Loading…
Reference in a new issue