Commit 2b6c04c7 authored by michaelni's avatar michaelni

use FF_INPUT_BUFFER_PADDING_SIZE


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@1181 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 465107cb
...@@ -147,8 +147,8 @@ AVInputFormat *av_find_input_format(const char *short_name) ...@@ -147,8 +147,8 @@ AVInputFormat *av_find_input_format(const char *short_name)
*/ */
int av_new_packet(AVPacket *pkt, int size) int av_new_packet(AVPacket *pkt, int size)
{ {
int64_t* p; int i;
pkt->data = av_malloc(size + 9); pkt->data = av_malloc(size + FF_INPUT_BUFFER_PADDING_SIZE);
if (!pkt->data) if (!pkt->data)
return AVERROR_NOMEM; return AVERROR_NOMEM;
pkt->size = size; pkt->size = size;
...@@ -156,8 +156,10 @@ int av_new_packet(AVPacket *pkt, int size) ...@@ -156,8 +156,10 @@ int av_new_packet(AVPacket *pkt, int size)
pkt->pts = AV_NOPTS_VALUE; pkt->pts = AV_NOPTS_VALUE;
pkt->stream_index = 0; pkt->stream_index = 0;
pkt->flags = 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; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment