Federico Tomassetti
d450cb07d9
avplay: Check memory allocation
...
Bug-Id: CID 1288294
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
10 years ago
Vittorio Giovara
733f4b05f0
avplay: Check format allocation inside decode_thread()
...
CC: libav-stable@libav.org
Bug-Id: CID 1265718
10 years ago
Vittorio Giovara
266f241193
avplay: Check frame allocation inside video_thread()
...
CC: libav-stable@libav.org
Bug-Id: CID 1267893
10 years ago
Martin Storsjö
248d8fb60c
avplay: Use av_gettime_relative
...
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Luca Barbato
e58a140cf9
avplay: Always free opts
...
CC: libav-stable@libav.org
Bug-Id: CID 733793
10 years ago
Luca Barbato
cf83c01739
avplay: Always free find_stream_info options
...
CC: libav-stable@libav.org
Bug-Id: CID 1238794
10 years ago
Diego Biurrun
041caf1a63
avplay: Exit by default at the end of playback
...
This is the expected behavior shared by all other cli multimedia players.
Bug-Id: 732
10 years ago
Gabriel Dume
f929ab0569
cosmetics: Write NULL pointer equality checks more compactly
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
10 years ago
Martin Storsjö
cf280ed004
avplay: Handle pixel aspect ratio properly
...
This was broken (left half-implemented) in 354468fc12
.
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
11 years ago
Anton Khirnov
b36bc81cca
avplay: add support for seeking to chapter marks
11 years ago
Anton Khirnov
84f131921f
avplay: do not call avcodec_get_frame_defaults().
...
avcodec_decode_audio4() will reset the frame itself.
11 years ago
Anton Khirnov
eb891b3114
Replace all uses of avcodec_free_frame with av_frame_free().
11 years ago
Diego Biurrun
8f8bc92365
Add missing #includes for *INT64_MAX and *INT64_C
11 years ago
Anton Khirnov
5b9c3b4505
Replace all instances of avcodec_alloc_frame() with av_frame_alloc().
11 years ago
Anton Khirnov
fae753af70
avplay: drop -vismv option which does not do anything anymore
11 years ago
Diego Biurrun
03039f4c8c
miscellaneous typo fixes
11 years ago
Luca Barbato
26a44143ef
avplay: remove a warning
...
Set the data field in the flush_pkt to the pointer to the actual packet.
The field needs to contain a valid unique pointer, no read nor writes
are ever made to it.
12 years ago
Anton Khirnov
fa2a34cd40
lavfi: change the filter registering system to match the other libraries
...
Removes an arbitrary hardcoded limit on the number of filters.
12 years ago
Anton Khirnov
38f0c0781a
lavfi: merge avfiltergraph.h into avfilter.h
...
We do not support using filters without AVFilterGraph in practice
anyway, so there is no point in pretending we do.
12 years ago
Anton Khirnov
e5c32d6da7
avplay: remove the -debug option.
...
It just shadows the corresponding AVOption and prevents using named
constants.
12 years ago
Vittorio Giovara
2eaa3663fd
avplay: enable only when SDL 1.2 is found
...
SDL 2 is API incompatible.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years ago
Anton Khirnov
354468fc12
avplay: switch to new refcounted frames API
...
Remove now unused cmdutils get_buffer() implementation.
12 years ago
Vladimir Pantelic
db0a943266
avplay: apply the stream sample_aspect_ratio to decoded video frames
...
If there is a sample_aspect_ratio in the stream, then apply it to every
decoded frame in the same way as avconv does. This also makes sure that
the avfilter chain has access to the aspect ratio.
Signed-off-by: Vladimir Pantelic <vladoman@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
12 years ago
Anton Khirnov
e2718e7a70
avplay: Do not use removed av_get_int()
...
Fixes build with lavfi disabled.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
12 years ago
Justin Ruggles
6304f78edf
avplay: support mid-stream sample rate changes
...
Resample to the rate that was configured in SDL.
12 years ago
Justin Ruggles
f5962229bf
avplay: use audio parameters from the decoded frame instead of AVCodecContext
12 years ago
Diego Biurrun
c1ef30a6ba
De-doxygenize some top-level files
12 years ago
Anton Khirnov
716d413c13
Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat
12 years ago
Anton Khirnov
e7ba5b1de0
lavr: change the type of the data buffers to uint8_t**.
...
This is more consistent with what the rest of Libav does.
This breaks API.
12 years ago
Diego Elio Pettenò
5e3f9979fa
Use atexit() instead of defining a custom exit_program() interface.
12 years ago
Anton Khirnov
11d1ca4b2c
Use avcodec_free_frame() to free AVFrames.
12 years ago
Anton Khirnov
0e8dccb79b
avplay: get rid of ugly casts in the options table
12 years ago
Anton Khirnov
4e82cbb629
avplay: fix prototypes for option callbacks.
...
They have been wrong since 11d957fbd8
12 years ago
Anton Khirnov
f9fada2704
avconv: split printing "main options" into global and per-file.
12 years ago
Anton Khirnov
a3ad68d36c
cmdutils: extend -h to allow printing codec details.
12 years ago
Anton Khirnov
7c5012127f
cmdutils: change semantics of show_help_options() and document it.
...
Currently it takes a mask and value, such that options for which
(flags & mask) == value.
Change it to take required flags and forbidden flags instead. This is
shorter and simpler to understand.
12 years ago
Anton Khirnov
dc4c24a3d3
avtools: move some newlines to show_help_options().
...
Don't require every caller to supply them.
12 years ago
Anton Khirnov
f617135bc9
avtools: fix show_foo() signatures.
...
show_foo() functions are declared as void show_foo(void), but called as
int show_foo(const char*, const char*).
12 years ago
Konstantin Pavlov
1a4b556786
avplay: fix build with lavfi disabled.
...
Issue introduced in 67339f6e
.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
12 years ago
Anton Khirnov
02ac7311c8
lavfi: use avfilter_unref_bufferp() where appropriate.
12 years ago
Justin Ruggles
8ca08066fc
lavr: Use AV_SAMPLE_FMT_NONE to auto-select the internal sample format
...
Also make this the default value.
13 years ago
Anton Khirnov
2696789c52
avplay: update input filter pointer when the filtergraph is reset.
...
Fixes an invalid read on size change.
13 years ago
Martin Storsjö
296d0da8bd
avplay: Add an option for not limiting the input buffer size
...
For reading from normal files on disk, the queue limits for
demuxed data work fine, but for reading data from realtime
streams, they mean we're not reading from the input stream
at all once the queue limit has been reached. For TCP streams,
this means that writing to the socket from the peer side blocks
(potentially leading to the peer dropping data), and for UDP
streams it means that our kernel might drop data.
For some protocols/servers, the server initially sends a
large burst with data to fill client side buffers, but once
filled, we should keep reading to avoid dropping data.
For all realtime streams, it IMO makes sense to just buffer
as much as we get (rather in buffers in avplay.c than in
OS level buffers). With this option set, the input thread
should always be blocking waiting for more input data,
never sleeping waiting for the decoder to consume data.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Luca Barbato
906f9dce85
avplay: fix write on freed memory for rawvideo
...
Do not assume avpacket and the decoded frames are independent.
To be absolutely sure and not sprinkle av_free_packet around the code
the call had been placed before getting the frame and on the error path.
13 years ago
Martin Storsjö
d3ed1c9571
cmdutils: Pass the actual chosen encoder to filter_codec_opts
...
This allows passing the right options to encoders when there's more
than one encoder for a certain codec id.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Mans Rullgard
896bb0d742
Replace usleep() calls with av_usleep()
...
This reduces the dependency on unistd.h which is not available
on all systems.
Signed-off-by: Mans Rullgard <mans@mansr.com>
13 years ago
Diego Biurrun
d246c18ea6
Avoid C99 variable declarations within for statements.
...
We generally do not declare variables within for statements and
there are compilers that choke on such constructs.
13 years ago
Anton Khirnov
67339f6eb4
avplay: use buffersrc instead of custom input filter.
...
We do not allow user filters, so avtools shouldn't use them either.
It also allows to reuse buffer management code from avconv, thus
reducing duplication.
13 years ago
Anton Khirnov
ac71230902
lavfi: add video buffer sink, and use it in avtools
...
Also add the public interface libavfilter/buffersink.h.
Based on a commit by Stefano Sabatini.
13 years ago
Justin Ruggles
85e5b866dc
avplay: properly close/reopen AVAudioResampleContext on channel layout change
...
fixes Bug#280
13 years ago