1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-19 05:49:09 +02:00

15 Commits

Author SHA1 Message Date
Andreas Rheinhardt
ec43a80774 fftools/ffmpeg: Free swresample dictionary during cleanup
Freeing this was forgotten in ad899522.

Fixes  and .

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 6f2a3958cfac135c60b509a61a4fd39432d8f9a9)
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-07-03 00:03:45 +02:00
Andreas Rheinhardt
00e52eff65 fftools/ffmpeg_opt: Fix signed integer overflow
Fixes ticket .

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 2b1fcba8ddcb7d29299ea28403fb597640a7288b)
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-07-03 00:02:25 +02:00
Andreas Rheinhardt
32467cfc07 fftools/ffmpeg_opt: Check attachment filesize
The data of an attachment file is put into an AVCodecParameter's
extradata. The corresponding size field has type int, yet there was no
check for the size to fit into an int. As a consequence, it was possible
to create extradata with negative size (by using a big enough max_alloc).

Other errors were also possible: If SIZE_MAX < INT64_MAX (e.g. on 32bit
systems) then the file size might be truncated before the allocation;
and avio_read() takes an int, too, so one would not have read as much
as one desired.

Furthermore, the extradata is now padded as is required.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
(cherry picked from commit 889ad93c8839e5ac1ec28bc8e1fea6df71b9bf80)
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-07-02 23:56:13 +02:00
Michael Niedermayer
49a8960cdc fftools/ffmpeg: Fix integer overflow in duration computation in seek_to_start()
Fixes: signed integer overflow: -9223372036854775808 - 9223372036854775807 cannot be represented in type 'long'
Fixes: Ticket8142

Found-by: Suhwan
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 4f4ad33d96a01d82edf56d58599017cb0ae5bfa8)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-07-02 19:55:09 +02:00
Michael Niedermayer
4376377c51 fftools/ffmpeg: Repair reinit_filter feature
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 35040048793bc5d19942277fe17d1235e915a7d8)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-03-24 10:38:51 +01:00
Michael Niedermayer
f35fb0c826 fftools/ffmpeg: Fallback to duration if sample rate is unavailable
Regression since: af1761f7
Fixes: Division by 0
Fixes: ffmpeg_crash_1

Found-by: Thuan Pham, Marcel Böhme, Andrew Santosa and Alexandru Razvan Caciulescu with AFLSmart
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 16d8b13b3b26c19d7f8856e039fe6662d96b4ff3)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-06-18 01:16:04 +02:00
Michael Niedermayer
561e276899 ffserver: Fix off by 1 error in path
Code suggested by ubitux

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 617f0c65e1bac8983a5b6521818c1b9b57f0804b)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-12-07 23:38:06 +01:00
Marton Balint
88a6fca74d ffplay: use SDL2 audio API
It allows us to specify what kind of audio parameter changes are allowed.

Should fix ticket .

Signed-off-by: Marton Balint <cus@passwd.hu>
(cherry picked from commit d68a557df4937b695a5f6a14877d92647be95aaa)
2017-11-12 21:00:26 +01:00
Marton Balint
46aa734646 ffplay: only use hardware accelerated SDL texture formats
Typically only a small subset of the SDL texture formats are supported directly
by the SDL renderer drivers, the rest is software emulated. It's better if
libswscale does the format conversion to a hardware-accelerated texture format
instead of SDL.

This should fix video render slowdowns with some texture formats after
3bd2228d05a05eab5f91ac00b01efac9cb07649b.

Signed-off-by: Marton Balint <cus@passwd.hu>
(cherry picked from commit 415038f2bd321a3b41564d4e0c6c17d7a096c397)
2017-11-12 20:59:42 +01:00
Marton Balint
0158fd5276 ffplay: create the window and the renderer before starting playback
Signed-off-by: Marton Balint <cus@passwd.hu>
(cherry picked from commit 84d31e2475c41b0a69a11c4cba54755d034bb341)
2017-11-12 20:59:27 +01:00
Marton Balint
0ca0ec26a6 ffmpeg: always init output stream before reaping filters
Otherwise the frame size of the codec is not set in the buffersink.

Fixes ticket  and the following simpler case:

ffmpeg -c aac -filter_complex "sine=d=0.1,asetnsamples=1025" out.aac

Signed-off-by: Marton Balint <cus@passwd.hu>
(cherry picked from commit f4090940bd3024e69d236257d327f11d1e496229)
2017-11-12 20:58:24 +01:00
Sasi Inguva
8500de89ea ffmpeg.c: Fallback to duration_dts, when duration_pts can't be determined.
This is required for FLV files, for which duration_pts comes out to be zero.

Signed-off-by: Sasi Inguva <isasi@google.com>
Reviewed-by: Thomas Mundt <tmundt75@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 2b006ccf8318d84101ed83b75df4c9682a963217)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-10-15 01:43:23 +02:00
Marton Balint
41569bbc66 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 :
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>
2017-10-08 22:32:13 +02:00
James Almer
3e6829a8aa build: fix compilation of tools with OpenCL enabled
Signed-off-by: James Almer <jamrial@gmail.com>
2017-10-03 11:56:56 -03:00
James Almer
fd5f4ac081 Merge commit 'c95169f0ec68bdeeabc5fde8aa4076f406242524'
* commit 'c95169f0ec68bdeeabc5fde8aa4076f406242524':
  build: Move cli tool sources to a separate subdirectory

Merged-by: James Almer <jamrial@gmail.com>
2017-10-01 18:26:36 -03:00