summaryrefslogtreecommitdiff
path: root/libavformat/webpenc.c
Commit message (Collapse)AuthorAgeFilesLines
* avformat/avformat: Move AVOutputFormat internals out of public headerAndreas Rheinhardt2023-02-091-7/+8
| | | | | | | | | | | | | | This commit does for AVOutputFormat what commit 20f972701806be20a77f808db332d9489343bb78 did for AVCodec: It adds a new type FFOutputFormat, moves all the internals of AVOutputFormat to it and adds a now reduced AVOutputFormat as first member. This does not affect/improve extensibility of both public or private fields for muxers (it is still a mess due to lavd). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* avformat/webpenc: Don't use sizeof(AVPacket)Andreas Rheinhardt2021-10-031-21/+16
| | | | | | | | | In this case it means replacing a packet in the muxer's context by a pointer to an AVPacket, namely AVFormatInternal.pkt. Because this packet is freed generically, one can remove the muxer's deinit function. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat: Constify all muxer/demuxersAndreas Rheinhardt2021-04-271-1/+1
| | | | | | | This is possible now that the next-API is gone. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/webpenc: don't assume animated webp streams will have more than one ↵James Almer2021-04-161-1/+1
| | | | | | | | | | | | | packet The libwebp_animencoder returns a single packet with the entire animated stream, as that's what the external library produces. As such, only ensure the stream was produced by said encoder (or propagated by a demuxer, once support is added) when attempting to write the requested loop value. Fixes ticket #9179. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/webpenc: Fix memleak when trailer is never writtenAndreas Rheinhardt2021-03-241-0/+8
| | | | | | | | When the trailer is never written (or when a stream switches from non-animation mode to animation mode mid-stream), a cached packet (if existing) would leak. Fix this by adding a deinit function. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/webpenc: ReindentationAndreas Rheinhardt2021-03-241-11/+11
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/webpenc: Fix memleak when using invalid packetsAndreas Rheinhardt2021-03-241-10/+11
| | | | | | | | | | | | | The WebP muxer sometimes caches a packet it receives to write it later; yet if a cached packet is too small (so small as to be invalid), it is cached, but not written and not unreferenced. Such a packet leaks, either by being overwritten by the next packet or because it is never unreferenced at all. Fix this by not caching unusable packets at all; and error out on invalid packets. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/webpenc: Use init instead of write_header functionAndreas Rheinhardt2021-03-241-2/+2
| | | | | | webp_write_header() didn't write anything. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat: replace all uses of av_copy_packet()James Almer2017-09-251-1/+1
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* Merge commit '9200514ad8717c63f82101dc394f4378854325bf'Derek Buitenhuis2016-04-101-5/+5
| | | | | | | | | | | | | | | | * commit '9200514ad8717c63f82101dc394f4378854325bf': lavf: replace AVStream.codec with AVStream.codecpar This has been a HUGE effort from: - Derek Buitenhuis <derek.buitenhuis@gmail.com> - Hendrik Leppkes <h.leppkes@gmail.com> - wm4 <nfxjfg@googlemail.com> - Clément Bœsch <clement@stupeflix.com> - James Almer <jamrial@gmail.com> - Michael Niedermayer <michael@niedermayer.cc> - Rostislav Pehlivanov <atomnuker@gmail.com> Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* Replace remaining occurances of av_free_packet with av_packet_unrefHendrik Leppkes2015-10-271-1/+1
|
* WebP muxer: support a packet containing animated WebP.Urvang Joshi2015-05-221-15/+64
| | | | | | | This is the 1st patch in preparation for using WebPAnimEncoder API for encoding and muxing WebP images. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avformat/webpenc: preserve single image VP8X flagsMichael Niedermayer2014-11-071-12/+26
| | | | | | Fixes Ticket4087 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avformat/webpenc: removed unused variableMichael Niedermayer2014-11-021-1/+0
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avformat: add webp muxerMichael Niedermayer2014-11-011-0/+156
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>