diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index 244b9ed4c2..4c48fde8f3 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -893,7 +893,7 @@ static void mpegts_push_data(MpegTSFilter *filter, case MPEGTS_PESHEADER_FILL: len = pes->pes_header_size - pes->data_index; if (len < 0) - return + return; if (len > buf_size) len = buf_size; memcpy(pes->header + pes->data_index, p, len);