]> git.sesse.net Git - ffmpeg/commit
ffmpeg: always use single threaded decoding for attached pictures
authorMarton Balint <cus@passwd.hu>
Fri, 6 Oct 2017 19:49:09 +0000 (21:49 +0200)
committerMarton Balint <cus@passwd.hu>
Sun, 8 Oct 2017 20:32:13 +0000 (22:32 +0200)
commit41569bbc66d8971a1c5d369e5b335b3542f9cd26
tree914a2693a7156af22f0f64fc853eacf20d76e2d7
parent41d6d627024393c142cf7cd93eff1d5a049105f5
ffmpeg: always use single threaded decoding for attached pictures

Since af1761f7b5b1b72197dc40934953b775c2d951cc ffmpeg waits for a frame in each
stream before writing the output header. If we are using threaded decoding for
attached pictures, we have to read till EOF to be able to finally flush the
decoder and output the decoded frame. This essentially makes ffmpeg buffer all
non-attached picture packets, which will cause a "Too many packets buffered for
output stream" eventually.

By forcing single threaded decoding, we get a frame from a single packet as
well and we can avoid the error.

Fixes part of ticket #6375:
ffmpeg -i 46564100.mp3 -acodec libmp3lame -ab 128k -ac 2 out.mp3

Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
fftools/ffmpeg.c