From 8bb7dda2f7e8cee4d3f7c755ec1d411cebe1327a Mon Sep 17 00:00:00 2001 From: Baptiste Coudurier Date: Sun, 13 Sep 2009 20:08:47 +0000 Subject: ensure pes buffer is set to avoid segv Originally committed as revision 19836 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/mpegts.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index 90510de99e..92a29a3b15 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -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; -- cgit v1.2.1