Stefano Sabatini
35fe88bb51
examples/muxing: reindent after previous commit
11 years ago
Stefano Sabatini
c92d2f98db
examples/muxing: flush encoders at the end
11 years ago
Stefano Sabatini
b539a72bba
examples/filtering_audio,video: drop call to avcodec_get_frame_defaults()
...
The avcodec_get_frame_defaults() function is deprecated and its use
doesn't seem required.
11 years ago
Stefano Sabatini
e34ad128a3
examples/muxing: reduce duration, remove wrong and misleading comment
...
Set duration to 10 seconds, after it was increased from 5 to 200 seconds
in 8d80f3cb87
.
200 seconds will generate too much data which is annoying especially when
testing.
11 years ago
Stefano Sabatini
9ab8f3738a
examples/muxing: remove redundant {}
11 years ago
Stefano Sabatini
b933c72b5e
examples/muxing: change error checks, from "ret != 0" to "ret < 0"
...
More consistent and more future-proof.
11 years ago
Stefano Sabatini
d72c742d47
examples/muxing: factorize write_interleave code
...
Also log output packet information.
11 years ago
Stefano Sabatini
5e2b8e4934
examples: add remuxing example
...
Show how to perform streamcopy from one container to another.
11 years ago
Stefano Sabatini
d497141b85
examples/muxing: simplify video PTS setting
...
Rely on frame_count. Also more consistent with audio path.
11 years ago
Andre Anjos
23ffc4c70d
doc/examples/muxing: Fixes frame initialization.
...
Fixes use of the example with encoders which use tha AVFrame w/h/pix_fmt fields
FFV1 is one of these codecs
We cannot easily workaround the not set fields in common code because the API
has AVFrame constant for the encoders.
Alternatives would be to fix the API or to duplicate the struct and fill in
missing fields. Or as is to require all user apps to set this correctly and
maybe simplify for that case
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Stefano Sabatini
094c500caf
examples/muxing: set timestamps in output audio packet
...
In particular, fix trac ticket #3231 .
11 years ago
Stefano Sabatini
8d22d37e54
examples/muxing: use av_frame_free() in place of av_free()
11 years ago
Stefano Sabatini
9abe4a10fd
examples/muxing: reuse global audio frame
...
Simplify logic, avoid multiple unnecessary alloc/free operations.
11 years ago
Stefano Sabatini
80bca6eabe
examples/muxing: honour distinction between encoder PTS timebase and stream timebase
...
Fix PTS set on the frame when encoding, which must be specified in the
encoder timebase or this will confuse the encoder.
When muxing the packet, the PTS/DTS generated by the encoder is then
rescaled to the stream timebase.
11 years ago
Stefano Sabatini
eadc421259
examples/muxing: set sample formats from list of codec supported sample formats
...
Avoid the need of tweaking, also show how to get list of supported sample
formats.
11 years ago
Stefano Sabatini
2503928a2f
examples/decoding_encoding: fix style nits
11 years ago
Ilya Basin
d1b8e01ef1
examples/muxing: fix memleaks in resampler
...
- do not allocate resample dst buffer when resample is off
- free sample buffers in addition to freeing data pointer arrays
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Ilya Basin
7d1d0b3ecf
examples/muxing: use S16 sample_fmt for resample src regardless of codec sample_fmt
...
We generate S16 samples and we should allocate the right buffer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Ilya Basin
b6714fa077
examples/muxing: fix av_frame_free() not called when got_packet is false
...
Hi list! Since my last patch (fix 2 memleaks in doc/examples/muxing.c)
I found more problems to fix.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Stefano Sabatini
b2a4316287
examples/decoding_encoding: check av_samples_get_buffer_size() for a negative value
...
Fix broken != 0 check.
11 years ago
Timothy Gu
c65fe9e982
examples/decoding_encoding: check av_samples_get_buffer_size() return code
...
Fixes CID1135756.
Signed-off-by: Timothy Gu <timothygu99@gmail.com>
11 years ago
Timothy Gu
b242c156e5
examples/resample_audio: check av_samples_get_buffer_size() return code
...
Fixes CID1135757.
Signed-off-by: Timothy Gu <timothygu99@gmail.com>
11 years ago
Clément Bœsch
b02d87936b
examples/demuxing_decoding: print the decoding error when it happens.
11 years ago
Even Wiik Thomassen
43f116d162
examples/demuxing_decoding: return error when no codec found
...
The open_codec_context function, when it fails to find a codec, now
return AVERROR(EINVAL) to signal an error.
Before it would return the stream index, which was always >= 0, and
continue as if a codec was found. This change make it fail faster,
instead of repeated failed tries to decode frames with no codec.
Signed-off-by: Even Wiik Thomassen <e.thomassen@sportradar.com>
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
11 years ago
Anton Khirnov
eb891b3114
Replace all uses of avcodec_free_frame with av_frame_free().
11 years ago
Michael Niedermayer
210a78aeb5
doc/examples/filtering_audio: init packet0.data
...
Fixes use of uinitialized data and crash
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Stefano Sabatini
c490cd4c1a
doc/examples/filtering_audio: fix chunked audio decoding
...
Support the case when multiple frames are contained in a single packet.
In particular, fix fate-samples/lossless-audio/luckynight-partial.shn
sample decoding.
11 years ago
Stefano Sabatini
893f33e7f0
doc/examples/filtering_audio: fix style
11 years ago
Stefano Sabatini
c7a99d99bd
doc/examples/filtering_video: do not make use of AVBufferSinkParams
...
Set the value on the filter context instead. Simplify.
11 years ago
Stefano Sabatini
3aa6018010
doc/examples/filtering_video: add some error handling in init_filters()
11 years ago
Stefano Sabatini
a12bf9f50f
doc/examples/README: fix typo
11 years ago
Stefano Sabatini
55c57658d2
doc/examples/filtering_audio: add more error checks
11 years ago
Stefano Sabatini
82e74ee6e4
doc/examples/filtering: make use of av_err2str()
...
Simplify.
11 years ago
Clément Bœsch
0d2c832445
doc/examples: update README.
11 years ago
Clément Bœsch
a8ac2a1530
doc/examples: make fill_samples static.
...
This is required to build with FFmpeg compilation options.
11 years ago
Clément Bœsch
e5102feb6b
doc/examples: add transcode_aac to local Makefile.
11 years ago
Michael Niedermayer
ba728c1a25
doc/examples/transcode_aac: remove non converted codepath
...
This codepath is not implemented and just crashes, also its simpler
without special cases, which makes sense for an example
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
7497c894cd
doc/examples/transcode_aac: switch to swresample
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
02abc905cd
doc/examples/transcode_aac: fix project name
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Andreas Unterweger
10421bcf0a
Add an audio transcoding example.
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
11 years ago
Diego Biurrun
ab81f24ad4
build: Integrate multilibrary examples into the build system
...
This includes moving libavformat/output-example to doc/examples/output.
11 years ago
Stefano Sabatini
50a28b1393
doc/examples: do not check NULL values for avcodec_close()
...
avcodec_close() does nothing in case the argument is NULL. Simplify.
11 years ago
Clément Bœsch
1f7b7d5447
doc/examples: fix mem issues in filtering_video.
11 years ago
Clément Bœsch
fb10b43fc4
doc/examples: rename demuxing to demuxing_decoding.
...
That example shows how the decoding process works, not only the
demuxing.
11 years ago
Clément Bœsch
d10b1a200d
doc/examples/demuxing: show how to use the reference counting system.
11 years ago
Clément Bœsch
0c6bb53bb2
doc/examples/demuxing: reset got_frame.
...
Fix infinite loop at flushing.
11 years ago
Clément Bœsch
dc8f732292
doc/examples: fix lib math dep for resampling_audio.
...
It uses at least sin()
11 years ago
Clément Bœsch
98b9bbb787
doc/examples: remove extra "the".
...
"into the doc/examples directory" vs "into doc/examples".
11 years ago
Michael Niedermayer
f187390907
doc/examples/filtering_audio: make const arrays also static
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
wm4
72f5a6d067
examples: demuxing: print ffplay command even if sample format is planar
...
Adjust the code so that a working ffplay command is printed in the
planar audio case.
12 years ago