1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

ensure pes buffer is set to avoid segv

Originally committed as revision 19836 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Baptiste Coudurier 2009-09-13 20:08:47 +00:00
parent 8956f68014
commit 8bb7dda2f7

View File

@ -1027,7 +1027,7 @@ static int mpegts_push_data(MpegTSFilter *filter,
}
break;
case MPEGTS_PAYLOAD:
if (buf_size > 0) {
if (buf_size > 0 && pes->buffer) {
if (pes->data_index+buf_size > pes->total_size) {
new_pes_packet(pes, ts->pkt);
pes->total_size = MAX_PES_PAYLOAD;