summaryrefslogtreecommitdiff
path: root/libavcodec/avcodec.c
Commit message (Collapse)AuthorAge
* avcodec/avcodec: Actually honour the documentation of subtitle_headerAndreas Rheinhardt2021-04-24
| | | | | | | | | | It is only supposed to be freed by libavcodec for decoders, yet avcodec_open2() always frees it on failure. Furthermore, avcodec_close() doesn't free it for decoders. Both of this has been changed. Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/avcodec: Use AVBPrint in avcodec_string()Andreas Rheinhardt2021-03-24
| | | | | | | | It automatically records the current length of the string, whereas the current code contains lots of instances of snprintf(buf + strlen(buf), buf_size - strlen(buf), ...). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/avcodec: Update check for identical colorspace/primaries/trc namesAndreas Rheinhardt2021-03-24
| | | | | | | | | | | | | | | | | If the numerical constants for colorspace, transfer characteristics and color primaries coincide, the current code presumes the corresponding names to be identical and prints only one of them obtained via av_get_colorspace_name(). There are two issues with this: The first is that the underlying assumption is wrong: The names only coincide in the 0-7 range, they differ for more recent additions. The second is that av_get_colorspace_name() is outdated itself; it has not been updated with the names of the newly defined colorspaces. Fix both of this by using the names from av_color_(space|primaries|transfer)_name() and comparing them via strcmp; don't use av_get_colorspace_name() at all. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/avcodec: Don't use NULL for %s printf specifierAndreas Rheinhardt2021-03-24
| | | | | | | Our "get name" functions can return NULL for invalid/unknown arguments. So check for this. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/avcodec: Use dedicated pointer to access AVCodecInternalAndreas Rheinhardt2021-03-24
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/avcodec: Move decoder channel count check to ff_decode_preinitAndreas Rheinhardt2021-03-20
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/avcodec: Sanitize options before using themAndreas Rheinhardt2021-03-20
| | | | | | | | | This is how it is supposed to happen, yet when using frame threading, the codec's init function has been called before preinit. This can lead to crashes when e.g. using unsupported lowres values for decoders together with frame threading. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/avcodec: Perform sub_charenc/iconv checks before AVCodec.init()Andreas Rheinhardt2021-03-20
| | | | | | Also move them to ff_decode_preinit(). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/avcodec: Check earlier for codec id/type mismatchAndreas Rheinhardt2021-03-20
| | | | | | | These fields can't be set via AVOptions, ergo one can check them before having allocated anything. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec: move core AVCodecContext functions from util.c to a new fileJames Almer2021-03-19
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* broken mess removialMichael Niedermayer2004-09-29
| | | | Originally committed as revision 3539 to svn://svn.ffmpeg.org/ffmpeg/trunk
* libdts support by (Benjamin Zores <ben at geexbox dot org>)Michael Niedermayer2004-07-14
| | | | Originally committed as revision 3310 to svn://svn.ffmpeg.org/ffmpeg/trunk
* flash video (flv) support patch by (Garrick Meeker <gmeeker at theoryllc dot ↵Garrick Meeker2003-07-09
| | | | | | com>) Originally committed as revision 2024 to svn://svn.ffmpeg.org/ffmpeg/trunk
* per file doxyMichael Niedermayer2003-03-06
| | | | Originally committed as revision 1634 to svn://svn.ffmpeg.org/ffmpeg/trunk
* * still unfinished code for OptionsZdenek Kabelac2003-02-10
| | | | | | * demo code - awating more comments Originally committed as revision 1569 to svn://svn.ffmpeg.org/ffmpeg/trunk
* * useless commit - ignoreZdenek Kabelac2002-11-11
| | | | Originally committed as revision 1193 to svn://svn.ffmpeg.org/ffmpeg/trunk
* * first shot for the new avcodec APIZdenek Kabelac2002-05-14
- comments, critics, improvements on the ffmpeg list are welcomed Originally committed as revision 494 to svn://svn.ffmpeg.org/ffmpeg/trunk