diff options
author | Janne Grunau <janne-libav@jannau.net> | 2011-11-24 00:18:33 +0100 |
---|---|---|
committer | Janne Grunau <janne-libav@jannau.net> | 2011-11-24 00:33:02 +0100 |
commit | aa38cff2c6fdc1c0a7245f8a2aef5f6d4d2881d1 (patch) | |
tree | 7aa67732303661f4e78b78d9caa405a919da52c0 /avconv.c | |
parent | c1848c4b26fda0c5060dceef6c45666e31345032 (diff) | |
download | ffmpeg-aa38cff2c6fdc1c0a7245f8a2aef5f6d4d2881d1.tar.gz |
avconv: fix segfault at EOF with delayed pictures
At EOF it makes no sense to modify avpkt.{data,size} in output_packet
since no data is consumed. Frame threading with more than 1 threads
hits the segfault.
Diffstat (limited to 'avconv.c')
-rw-r--r-- | avconv.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -1892,8 +1892,11 @@ static int output_packet(InputStream *ist, if (ret < 0) return ret; - avpkt.data += ret; - avpkt.size -= ret; + // touch data and size only if not EOF + if (pkt) { + avpkt.data += ret; + avpkt.size -= ret; + } if (!got_output) { continue; } |