aboutsummaryrefslogtreecommitdiffstats
path: root/libav
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2002-11-09 15:53:52 +0000
committerMichael Niedermayer <michaelni@gmx.at>2002-11-09 15:53:52 +0000
commit8cd5be983bf1020c82deff7a63bd8c290ab9bd52 (patch)
tree2847f6c5d959d00eef01064e22f58a83eb8d0e3c /libav
parentb1d89f82b4ecb8a54d1d1a42b103ed8fdbe1fd75 (diff)
downloadffmpeg-8cd5be983bf1020c82deff7a63bd8c290ab9bd52.tar.gz
use FF_INPUT_BUFFER_PADDING_SIZE
Originally committed as revision 1181 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libav')
-rw-r--r--libav/utils.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/libav/utils.c b/libav/utils.c
index 0c12561b8d..78004d699b 100644
--- a/libav/utils.c
+++ b/libav/utils.c
@@ -147,8 +147,8 @@ AVInputFormat *av_find_input_format(const char *short_name)
*/
int av_new_packet(AVPacket *pkt, int size)
{
- int64_t* p;
- pkt->data = av_malloc(size + 9);
+ int i;
+ pkt->data = av_malloc(size + FF_INPUT_BUFFER_PADDING_SIZE);
if (!pkt->data)
return AVERROR_NOMEM;
pkt->size = size;
@@ -156,8 +156,10 @@ int av_new_packet(AVPacket *pkt, int size)
pkt->pts = AV_NOPTS_VALUE;
pkt->stream_index = 0;
pkt->flags = 0;
- p = (int64_t*)&pkt->data[size];
- *p = 0;
+
+ for(i=0; i<FF_INPUT_BUFFER_PADDING_SIZE; i++)
+ pkt->data[size+i]= 0;
+
return 0;
}