The warning is:
libavfilter/avfiltergraph.c: In function ‘avfilter_graph_config’:
libavfilter/avfiltergraph.c:528:9: warning: ‘best_idx’ may be used uninitialized in this function [-Wuninitialized]
libavfilter/avfiltergraph.c:479:13: note: ‘best_idx’ was declared here
Initialize it to an invalid value and add an assert that it's properly
set later.
It would have been done anyway in the av_dict_set() call.
This simplifies the code and avoid a warning because of assigning a
const string from ff_id3v1_genre_str to a non-const variable.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Fix near infinite loop in stsd parsing.
Bug found by: Diana Elena Muscalu
The size is unsigned according the specification.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Avoid a near infinite loop.
Issue discovered by cosminamironesei.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
These arguments are either constants or copies of MpegEncContext
fields just as easily accessed within the function.
Signed-off-by: Mans Rullgard <mans@mansr.com>
These functions do not benefit from being inlined. They are large,
and there are no opportunities for constant propagation.
Signed-off-by: Mans Rullgard <mans@mansr.com>
Previously, object files in, for example, compat/ were left
after a clean or distclean was run.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Based on the code by:
Peter Belkner <pbelkner@snafu.de>,
Michael Niedermayer <michaelni@gmx.at>,
Clément Bœsch <clement.boesch@smartjog.com>,
Reimar Döffinger <Reimar.Doeffinger@gmx.de>, and
Tobias Rapp <t.rapp@noa-audio.com>
Alex Converse <alex.converse@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
This is consistent with stdio and is what we want to do in all cases.
Fixes a bug in the voc muxer which didn't flush in write_trailer()
previously. This is the cause of the change in the test results.
Some compilers are extra strict about register usage in main(),
disallowing ebp in inline asm there while allowing it elsewhere.
This change makes the test better reflect actual usage.
Signed-off-by: Mans Rullgard <mans@mansr.com>
In both usages of FASTDIV the denominator might be 1.
Using a branch could make the function slower than using a normal
division.
Both denominator and numerator can be multiplied by 2 safely and
using shifts is faster than using a branch.
The missing headers are required for errno and for strerror.
This fixes building of this tool on mingw32ce.
Signed-off-by: Martin Storsjö <martin@martin.st>
Windows CE doesn't have neither mkdir nor _mkdir officially (only
CreateDirectoryW), but mingw32ce has compat wrappers with these names
(declared in io.h since direct.h is unavailable).
Signed-off-by: Martin Storsjö <martin@martin.st>