diff options
author | Marton Balint <cus@passwd.hu> | 2014-05-02 01:44:19 +0200 |
---|---|---|
committer | Marton Balint <cus@passwd.hu> | 2014-05-05 22:33:52 +0200 |
commit | 9ba8debce9946b21c20791b0d234443f71e471a0 (patch) | |
tree | 248490b22a08fc0fe32f81a9e058ba1ba90a2a60 /libavformat/mpegts.c | |
parent | a82e87618fc04fe146ccd2da5f50154c4461e3f6 (diff) | |
download | ffmpeg-9ba8debce9946b21c20791b0d234443f71e471a0.tar.gz |
mpegts: only emit new packets if data buffer exists
I don't think this can acutally happen in the current code, but better safe
than sorry.
Fixes Coverity CID 732217.
Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'libavformat/mpegts.c')
-rw-r--r-- | libavformat/mpegts.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index 20bed02261..001f93bb81 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -1125,8 +1125,6 @@ skip: } memcpy(pes->buffer->data + pes->data_index, p, buf_size); pes->data_index += buf_size; - } - buf_size = 0; /* emit complete packets with known packet size * decreases demuxer delay for infrequent packets like subtitles from * a couple of seconds to milliseconds for properly muxed files. @@ -1137,6 +1135,8 @@ skip: ts->stop_parse = 1; new_pes_packet(pes, ts->pkt); } + } + buf_size = 0; break; case MPEGTS_SKIP: buf_size = 0; |