Commit 7305218e authored by michael's avatar michael

segfault fix


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@3322 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent ac04b14f
...@@ -1067,7 +1067,7 @@ static int output_packet(AVInputStream *ist, int ist_index, ...@@ -1067,7 +1067,7 @@ static int output_packet(AVInputStream *ist, int ist_index,
uint8_t *data_buf; uint8_t *data_buf;
int data_size, got_picture; int data_size, got_picture;
AVFrame picture; AVFrame picture;
short samples[AVCODEC_MAX_AUDIO_FRAME_SIZE / 2]; short samples[pkt && pkt->size > AVCODEC_MAX_AUDIO_FRAME_SIZE/2 ? pkt->size : AVCODEC_MAX_AUDIO_FRAME_SIZE/2];
void *buffer_to_free; void *buffer_to_free;
if (pkt && pkt->dts != AV_NOPTS_VALUE) { //FIXME seems redundant, as libavformat does this too if (pkt && pkt->dts != AV_NOPTS_VALUE) { //FIXME seems redundant, as libavformat does this too
...@@ -1075,7 +1075,7 @@ static int output_packet(AVInputStream *ist, int ist_index, ...@@ -1075,7 +1075,7 @@ static int output_packet(AVInputStream *ist, int ist_index,
} else { } else {
assert(ist->pts == ist->next_pts); assert(ist->pts == ist->next_pts);
} }
if (pkt == NULL) { if (pkt == NULL) {
/* EOF handling */ /* EOF handling */
ptr = NULL; ptr = NULL;
......
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