1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-07 11:13:41 +02:00
Go to file
Andreas Rheinhardt 41e0058b48 avfilter/src_movie: Remove unnecessary secondary AVPacket
The movie and amovie filters currently use two packets. One of the two,
pkt0, is the owner of the returned packet; it is also the destination
packet for av_read_frame(). The other one pkt is initially (i.e. after
av_read_frame()) a copy of pkt0; copy means that the contents of both
are absolutely the same: They both point to the same AVBufferRef and the
same side data. This violation of the refcounted packet API is only
possible because pkt is not considered to own its data. Only pkt0 is
ever unreferenced.
The reason for pkt's existence seems to be historic:
The API used for decoding audio (namely avcodec_decode_audio4()) could
consume frames partially, i.e. it could return multiple frames for one
packet and therefore it returned how much of the input buffer had been
consumed. The caller was then supposed to update the packet's data and
size pointer to reflect this and call avcodec_decode_audio4() again with
the updated packet to get the next frame.
But before the introduction of refcounted AVPackets where knowledge and
responsibility about what to free lies with the underlying AVBuffer such
a procedure required a spare packet (or one would need to record the
original data and size fields separately to restore them before freeing
the packet; notice that this code has been written when AVPackets still
had a destruct field). But these times are long gone, so just remove the
secondary AVPacket.

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-09-10 22:25:28 +02:00
compat
doc avformat: add mca demuxer 2020-09-10 17:38:08 +02:00
ffbuild ffbuild: Refine MIPS handling 2020-07-23 16:30:02 +02:00
fftools ffplay: fix autoexit doesn't work in the case of pb->error 2020-09-08 19:59:17 +02:00
libavcodec libavcodec/options_table: Add missing colorspace options 2020-09-10 17:22:09 +05:30
libavdevice avdevice/lavfi: Remove redundant av_packet_unref() 2020-09-06 21:45:41 +02:00
libavfilter avfilter/src_movie: Remove unnecessary secondary AVPacket 2020-09-10 22:25:28 +02:00
libavformat avformat/brstm: clip timestamp when seeking into acceptable range 2020-09-10 17:38:08 +02:00
libavresample
libavutil hwcontext_vaapi: Don't require a render node when deriving from DRM 2020-08-31 21:42:14 +01:00
libpostproc
libswresample swresample/rematrix: handle 22.2 as a 9 channel layout 2020-08-18 22:47:35 +03:00
libswscale swscale/x86/output: add missing AVX2 support preprocessor wrappers 2020-08-20 15:14:56 -03:00
presets
tests tests: fix warning ISO C90 forbids mixed declarations and code 2020-09-10 20:34:51 +08:00
tools tools/target_dec_fuzzer: Adjust threshold for WMV3IMAGE 2020-09-07 23:05:25 +02:00
.gitattributes
.gitignore
.mailmap
.travis.yml
Changelog avformat: add mca demuxer 2020-09-10 17:38:08 +02:00
configure configure: Add additional glslang libraries to make linking work 2020-09-07 13:18:00 -07:00
CONTRIBUTING.md
COPYING.GPLv2
COPYING.GPLv3
COPYING.LGPLv2.1
COPYING.LGPLv3
CREDITS
INSTALL.md
LICENSE.md
MAINTAINERS MAINTAINERS: add myself and gpg fingerprint 2020-07-17 21:57:18 +02:00
Makefile
README.md
RELEASE

FFmpeg README

FFmpeg is a collection of libraries and tools to process multimedia content such as audio, video, subtitles and related metadata.

Libraries

  • libavcodec provides implementation of a wider range of codecs.
  • libavformat implements streaming protocols, container formats and basic I/O access.
  • libavutil includes hashers, decompressors and miscellaneous utility functions.
  • libavfilter provides a mean to alter decoded Audio and Video through chain of filters.
  • libavdevice provides an abstraction to access capture and playback devices.
  • libswresample implements audio mixing and resampling routines.
  • libswscale implements color conversion and scaling routines.

Tools

  • ffmpeg is a command line toolbox to manipulate, convert and stream multimedia content.
  • ffplay is a minimalistic multimedia player.
  • ffprobe is a simple analysis tool to inspect multimedia content.
  • Additional small tools such as aviocat, ismindex and qt-faststart.

Documentation

The offline documentation is available in the doc/ directory.

The online documentation is available in the main website and in the wiki.

Examples

Coding examples are available in the doc/examples directory.

License

FFmpeg codebase is mainly LGPL-licensed with optional components licensed under GPL. Please refer to the LICENSE file for detailed information.

Contributing

Patches should be submitted to the ffmpeg-devel mailing list using git format-patch or git send-email. Github pull requests should be avoided because they are not part of our review process and will be ignored.