aboutsummaryrefslogtreecommitdiffstats
path: root/doc/examples
Commit message (Collapse)AuthorAgeFilesLines
...
* | examples/muxing: simplify video PTS settingStefano Sabatini2014-01-121-3/+1
| | | | | | | | Rely on frame_count. Also more consistent with audio path.
* | doc/examples/muxing: Fixes frame initialization.Andre Anjos2014-01-091-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | examples/muxing: set timestamps in output audio packetStefano Sabatini2014-01-091-0/+7
| | | | | | | | In particular, fix trac ticket #3231.
* | examples/muxing: use av_frame_free() in place of av_free()Stefano Sabatini2014-01-091-1/+1
| |
* | examples/muxing: reuse global audio frameStefano Sabatini2014-01-091-7/+13
| | | | | | | | Simplify logic, avoid multiple unnecessary alloc/free operations.
* | examples/muxing: honour distinction between encoder PTS timebase and stream ↵Stefano Sabatini2014-01-091-1/+5
| | | | | | | | | | | | | | | | | | | | 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.
* | examples/muxing: set sample formats from list of codec supported sample formatsStefano Sabatini2014-01-091-1/+2
| | | | | | | | | | Avoid the need of tweaking, also show how to get list of supported sample formats.
* | examples/decoding_encoding: fix style nitsStefano Sabatini2014-01-071-14/+14
| |
* | examples/muxing: fix memleaks in resamplerIlya Basin2013-12-211-12/+18
| | | | | | | | | | | | | | - 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>
* | examples/muxing: use S16 sample_fmt for resample src regardless of codec ↵Ilya Basin2013-12-211-1/+1
| | | | | | | | | | | | | | | | sample_fmt We generate S16 samples and we should allocate the right buffer Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | examples/muxing: fix av_frame_free() not called when got_packet is falseIlya Basin2013-12-211-1/+2
| | | | | | | | | | | | | | 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>
* | examples/decoding_encoding: check av_samples_get_buffer_size() for a ↵Stefano Sabatini2013-12-151-1/+1
| | | | | | | | | | | | negative value Fix broken != 0 check.
* | examples/decoding_encoding: check av_samples_get_buffer_size() return codeTimothy Gu2013-12-141-0/+4
| | | | | | | | | | | | Fixes CID1135756. Signed-off-by: Timothy Gu <timothygu99@gmail.com>
* | examples/resample_audio: check av_samples_get_buffer_size() return codeTimothy Gu2013-12-141-0/+4
| | | | | | | | | | | | Fixes CID1135757. Signed-off-by: Timothy Gu <timothygu99@gmail.com>
* | examples/demuxing_decoding: print the decoding error when it happens.Clément Bœsch2013-12-131-2/+2
| |
* | examples/demuxing_decoding: return error when no codec foundEven Wiik Thomassen2013-12-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge commit '48d17ee6dc2b2a552f645484f200c2946bf24607'Michael Niedermayer2013-12-121-2/+1
|\| | | | | | | | | | | | | * commit '48d17ee6dc2b2a552f645484f200c2946bf24607': api-example: remove an unneeded call to avcodec_get_frame_defaults(). Merged-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'eb891b3114f499e96b9faddd0b0ae856345dfbd9'Michael Niedermayer2013-12-112-5/+5
|\| | | | | | | | | | | | | | | | | | | * commit 'eb891b3114f499e96b9faddd0b0ae856345dfbd9': Replace all uses of avcodec_free_frame with av_frame_free(). Conflicts: doc/examples/decoding_encoding.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Replace all uses of avcodec_free_frame with av_frame_free().Anton Khirnov2013-12-111-1/+1
| |
* | doc/examples/filtering_audio: init packet0.dataMichael Niedermayer2013-12-031-0/+1
| | | | | | | | | | | | Fixes use of uinitialized data and crash Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | doc/examples/filtering_audio: fix chunked audio decodingStefano Sabatini2013-12-021-4/+15
| | | | | | | | | | | | Support the case when multiple frames are contained in a single packet. In particular, fix fate-samples/lossless-audio/luckynight-partial.shn sample decoding.
* | doc/examples/filtering_audio: fix styleStefano Sabatini2013-12-021-2/+2
| |
* | doc/examples/filtering_video: do not make use of AVBufferSinkParamsStefano Sabatini2013-12-021-5/+8
| | | | | | | | Set the value on the filter context instead. Simplify.
* | doc/examples/filtering_video: add some error handling in init_filters()Stefano Sabatini2013-12-021-6/+15
| |
* | doc/examples/README: fix typoStefano Sabatini2013-12-021-1/+1
| |
* | doc/examples/filtering_audio: add more error checksStefano Sabatini2013-12-021-10/+18
| |
* | doc/examples/filtering: make use of av_err2str()Stefano Sabatini2013-12-022-6/+2
| | | | | | | | Simplify.
* | doc/examples: update README.Clément Bœsch2013-11-281-4/+9
| |
* | doc/examples: make fill_samples static.Clément Bœsch2013-11-281-1/+1
| | | | | | | | This is required to build with FFmpeg compilation options.
* | doc/examples: add transcode_aac to local Makefile.Clément Bœsch2013-11-281-0/+1
| |
* | doc/examples/transcode_aac: remove non converted codepathMichael Niedermayer2013-11-271-7/+0
| | | | | | | | | | | | | | 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>
* | doc/examples/transcode_aac: switch to swresampleMichael Niedermayer2013-11-271-44/+34
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | doc/examples/transcode_aac: fix project nameMichael Niedermayer2013-11-271-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2013-11-271-0/+769
|\| | | | | | | | | | | | | | | | | | | | | * qatar/master: Add an audio transcoding example. Conflicts: configure doc/Makefile Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Add an audio transcoding example.Andreas Unterweger2013-11-271-0/+769
| | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
| * build: Integrate multilibrary examples into the build systemDiego Biurrun2013-11-251-0/+527
| | | | This includes moving libavformat/output-example to doc/examples/output.
* doc/examples: do not check NULL values for avcodec_close()Stefano Sabatini2013-11-213-8/+4
| | | | avcodec_close() does nothing in case the argument is NULL. Simplify.
* doc/examples: fix mem issues in filtering_video.Clément Bœsch2013-11-191-0/+3
|
* Merge commit '5b9c3b4505206143d85398c1410949319fa1180f'Michael Niedermayer2013-11-162-6/+6
| | | | | | | | | | | | | | | | | | | * commit '5b9c3b4505206143d85398c1410949319fa1180f': Replace all instances of avcodec_alloc_frame() with av_frame_alloc(). Conflicts: doc/examples/decoding_encoding.c doc/examples/muxing.c ffmpeg.c libavcodec/alacenc.c libavcodec/libopenjpegenc.c libavcodec/libvpxenc.c libavcodec/pcm.c libavcodec/xbmenc.c libavcodec/xwdenc.c libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
* doc/examples: rename demuxing to demuxing_decoding.Clément Bœsch2013-11-042-3/+3
| | | | | That example shows how the decoding process works, not only the demuxing.
* doc/examples/demuxing: show how to use the reference counting system.Clément Bœsch2013-11-041-6/+51
|
* doc/examples/demuxing: reset got_frame.Clément Bœsch2013-10-301-0/+2
| | | | Fix infinite loop at flushing.
* doc/examples: fix lib math dep for resampling_audio.Clément Bœsch2013-09-041-0/+1
| | | | It uses at least sin()
* doc/examples: remove extra "the".Clément Bœsch2013-09-041-1/+1
| | | | "into the doc/examples directory" vs "into doc/examples".
* doc/examples/filtering_audio: make const arrays also staticMichael Niedermayer2013-08-031-5/+5
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* examples: demuxing: print ffplay command even if sample format is planarwm42013-07-191-2/+14
| | | | | Adjust the code so that a working ffplay command is printed in the planar audio case.
* examples: demuxing: simplify audio outputwm42013-07-191-36/+10
| | | | | | | | There is no reason why this should copy the audio data in a very complicated way. Also, strictly write the first plane, instead of writing the whole buffer. This is more helpful in context of the example. This way a user can clearly confirm that it works by playing the written data as raw audio.
* examples: demuxing: do partial audio packet decodingwm42013-07-191-3/+16
| | | | | | This assumes one audio packet is decoded one time. This is not true: packets can be partially decoded. Then you have to "adjust" the packet and pass the undecoded part of the packet to the decode function again.
* examples/muxing: add support to audio resamplingStefano Sabatini2013-07-061-28/+93
| | | | | Allows to encode to output in case the destination sample format is different from AV_SAMPLE_FMT_S16.
* lavfi: create Libav-API compatibility layer for avfilter_graph_parse() at ↵Stefano Sabatini2013-07-032-2/+2
| | | | | | | | | | | | | | | | | the next bump Add function avfilter_graph_parse_ptr() and favor it in place of avfilter_graph_parse(), which will be restored with the old/Libav signature at the next bump. If HAVE_INCOMPATIBLE_LIBAV_API is enabled it will use the Libav-compatible signature for avfilter_graph_parse(). At the next major bump the current implementation of avfilter_graph_parse() should be dropped in favor of the Libav/old implementation. Should address trac ticket #2672.