The function was only used in opt_sample_fmt() for listing the sample
formats. Move list_fmts() functionality directly into
opt_sample_fmt().
Als fix the warning:
ffmpeg.c: In function ‘opt_audio_sample_fmt’:
ffmpeg.c:2877: warning: passing argument 1 of ‘list_fmts’ from incompatible pointer type
cmdutils.h:163: note: expected ‘void (*)(char *, int, int)’ but argument is of type ‘char * (*)(char *, int, enum AVSampleFormat)’
Conio.h is a non-standard header and may not have kbhit()
prototyped. This fixes compile on OS/2 where the EMX version (we're
using a fork) of conio.h only has getch() and getche().
Signed-off-by: Mans Rullgard <mans@mansr.com>
Remove usage of tcgetattr and tcsetattr to modify terminal
parameters, and rely on ctrl-c to stop instead of pressing 'q'.
On systems with conio.h, keep the old behavior.
Changing the terminal settings causes problems if multiple instances
are running asynchronously on the same terminal, such as during a
parallel FATE run, or if the process crashes before restoring the
terminal. In both cases, the terminal state is messed up requiring
a manual reset.
Signed-off-by: Mans Rullgard <mans@mansr.com>
Change "file:stream[:syncfile:syncstream]" to
"file.stream[:syncfile.syncstream]", the latter syntax is more
consistent with the stream identifier form printed by
av_dump_format(), and more readable. Both syntaxes are currently
accepted by the opt_map() code.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
This makes dumped packet timestamps proper for streams with
timebases other than AV_TIME_BASE.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
(cherry picked from commit 5e33e7bdac)
It is pretty hopeless that other considerable projects will adopt
libavutil alone in other projects. Projects that need small footprint
are better off with more specialized libraries such as gnulib or rather
just copy the necessary parts that they need. With this in mind, nobody
is helped by having libavutil and libavcore split. In order to ease
maintenance inside and around FFmpeg and to reduce confusion where to
put common code, avcore's functionality is merged (back) to avutil.
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
As a side effect of the last commit, avcodec_open() now calls it automatically,
so there is no longer any need for clients to call it.
Instead they should set AVCodecContext.thread_count.
avcodec_thread_free() is deprecated, and will be removed from avcodec.h at the
next MAJOR libavcodec bump.
Rename the functions to ff_thread_init/free, since they are now internal.
Wrappers are provided to maintain API compatibility.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit c0b102ca03)
As a side effect of the last commit, avcodec_open() now calls it automatically,
so there is no longer any need for clients to call it.
Instead they should set AVCodecContext.thread_count.
avcodec_thread_free() is deprecated, and will be removed from avcodec.h at the
next MAJOR libavcodec bump.
Rename the functions to ff_thread_init/free, since they are now internal.
Wrappers are provided to maintain API compatibility.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
No behavior change; this makes DTS reliable with the next patch.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 6b47495397)
Make avfilter_graph_free() free not only the internal structures, but
also the allocated graph, and set the graph pointer to NULL for
increased safety.
Simplify usage.
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 4359288c56)
Make avfilter_graph_free() free not only the internal structures, but
also the allocated graph, and set the graph pointer to NULL for
increased safety.
Simplify usage.
Signed-off-by: Mans Rullgard <mans@mansr.com>
It's consistent with the -metadata option and easier to write.
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
(cherry picked from commit 87e4d9b252)
If audio_sync_method is >1 the resampler is used for audio drift
compensation, and do_audio_out() was causing an assert failure because
audio_resample was not set.
Fix issue 2516, which was introduced by SVN r25939.
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 07b48f8c7a)
If audio_sync_method is >1 the resampler is used for audio drift
compensation, and do_audio_out() was causing an assert failure because
audio_resample was not set.
Fix issue 2516, which was introduced by SVN r25939.
Signed-off-by: Mans Rullgard <mans@mansr.com>
fixes issue2465.
The problem is that the ffmpeg (the app) -streamid option did not work
with -newaudio/-newvideo/-newsubtitle.
The cause was a conflict between the feature where streamid values were
reset to default for each output filename, and the implementation of
-new*, which requires that the -new* option be specified after the
target filename.
My patch changes the ffmpeg behavior so that user-specified streamid
values apply to all the following output files on the command line
(rather than just the next output filename.)
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
(cherry picked from commit 20ac9de3df)
fixes issue2465.
The problem is that the ffmpeg (the app) -streamid option did not work
with -newaudio/-newvideo/-newsubtitle.
The cause was a conflict between the feature where streamid values were
reset to default for each output filename, and the implementation of
-new*, which requires that the -new* option be specified after the
target filename.
My patch changes the ffmpeg behavior so that user-specified streamid
values apply to all the following output files on the command line
(rather than just the next output filename.)
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>