Commit Graph

19 Commits

Author SHA1 Message Date
0bcd4550b8 *: format code with rustfmt and fix clippy suggestions
* Add avformat_close_input call to clean up AVFormantContext
* Format code with rustfmt
* Fix clippy lint double_parens
* Fix clippy lint deref_addrof
* Fix clippy lint identity_conversion
* Fix clippy lint match_ref_pats
* Fix clippy lint cast_lossless
* Fix clippy lint cmp_null
* Fix clippy lint clone_on_ref_ptr
* Fix clippy lint map_clone
* Fix clippy lint needless_borrow
* Fix clippy lint needless_pass_by_value
* Fix clippy lints for examples
* Fix clippy lint unused_io_amount
* Fix clippy lint new_without_default
* Ignore inline_always clippy lint
* Add vim temp files to .gitignore
2018-04-10 16:06:42 +02:00
28b7a82ac1 format: add support for Chapters
Read chapters from an input context and add chapters to an output context.

Note: unlike avformat_new_stream, the equivalent function for chapter is private:
avpriv_new_chapter (part of libavformat/internal.h). I couldn't find any other
solution but re-implementing it in format::context::output::add_chapter.
2017-09-23 20:42:51 +02:00
052d342baf format: fix segmentation fault
Double free error.

On failure avformat_open_input frees AVFormatContext. I had it wrapped with context::Input::wrap. On avformat_open_input failure it would free AVFormatContext and Drop implementation for context::Input would try to call avformat_close_input on same AVFormatContext resulting in segmentation fault.
2017-08-21 19:38:36 +02:00
991bbc24e8 format: add interrupt callback support 2017-07-08 17:05:44 +02:00
5ac0527bdc *: use latest ffmpeg-sys using bindgen
* Update bindings to newest ffmpeg version for new ffmpeg-sys, which is mostly generated by bindgen
* Bring back removed feature flags
* Fix whitespace formating
* Remove prepended enum names to enum variants
* Remove unneeded allows
2017-07-08 17:00:27 +02:00
0328dc111a format: fix avformat_find_stream_info return handling
According to:
https://ffmpeg.org/doxygen/2.8/group__lavf__decoding.html#gad42172e27cddafb81096939783b157bb

...avformat_find_stream_info returns ">=0 if OK, AVERROR_xxx on error".
This occurs with several common formats, including MP4 and MKV.
2015-11-22 00:15:35 +01:00
bde17a8bae format: add _with() variants to open() 2015-09-25 16:43:17 +02:00
a76cdd7086 format: add Flags (AVFMV_*) 2015-09-14 13:53:48 +02:00
meh
f2fb08e491 util/dictionary: refactor and make more sound 2015-09-08 18:26:29 +02:00
meh
1f80007e5e format: split input and output formats 2015-09-04 16:30:19 +02:00
471a768b8e format/context: implement Context opening as output 2015-09-02 14:52:02 +02:00
9b612fc90f format: rename open* function to open_input* 2015-09-02 14:51:56 +02:00
meh
0f494cd9cb format: fix some memory unsafety in helpers 2015-07-02 07:52:59 +02:00
meh
ff1b880be6 *: make internal pointer handling safer 2015-06-04 03:03:19 +02:00
meh
5c402a1256 util: move SampleFormat and PixelFormat to util::format 2015-05-13 23:36:08 +02:00
meh
b7a015c79a format: add Format, format::Context and Stream 2015-05-12 03:57:17 +02:00
meh
67efc8b686 format/network: add network helpers 2015-05-12 03:55:41 +02:00
meh
59e067cb4d format: export PixelFormat and SampleFormat 2015-05-12 03:53:54 +02:00
meh
a45c011fbc format: add base 2015-05-12 03:53:19 +02:00