Commit Graph

19 Commits

Author SHA1 Message Date
Andreas Rheinhardt
11bc790893 avcodec: Remove deprecated AVCodecContext.coded_frame
Deprecated in 40cf1bbacc.
(The currently disabled filter vf_mcdeint and vf_uspp were users of
this field; they have not been changed, so that whoever wants to fix
them can see the state of these filters when they were disabled.)

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 10:43:12 -03:00
Andreas Rheinhardt
e8fdb0db16 avcodec: Remove lock manager API
Deprecated in a04c2c707d.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 10:43:03 -03:00
Andreas Rheinhardt
a1ed984e04 avcodec/avcodec: Actually honour the documentation of subtitle_header
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>
2021-04-24 13:56:43 +02:00
Andreas Rheinhardt
54127cc427 avcodec/avcodec: Use AVBPrint in avcodec_string()
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>
2021-03-24 08:00:57 +01:00
Andreas Rheinhardt
e65a5df4fa avcodec/avcodec: Update check for identical colorspace/primaries/trc names
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>
2021-03-24 08:00:57 +01:00
Andreas Rheinhardt
88b7d9fd36 avcodec/avcodec: Don't use NULL for %s printf specifier
Our "get name" functions can return NULL for invalid/unknown
arguments. So check for this.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-03-24 08:00:57 +01:00
Andreas Rheinhardt
48aa531984 avcodec/avcodec: Use dedicated pointer to access AVCodecInternal
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-03-24 08:00:57 +01:00
Andreas Rheinhardt
77616c5fb4 avcodec/avcodec: Move decoder channel count check to ff_decode_preinit
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-03-20 02:45:10 +01:00
Andreas Rheinhardt
746796ceb4 avcodec/avcodec: Sanitize options before using them
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>
2021-03-20 01:55:41 +01:00
Andreas Rheinhardt
e3156fa7c2 avcodec/avcodec: Perform sub_charenc/iconv checks before AVCodec.init()
Also move them to ff_decode_preinit().

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-03-20 01:50:46 +01:00
Andreas Rheinhardt
02e43c00ed avcodec/avcodec: Check earlier for codec id/type mismatch
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>
2021-03-20 01:43:55 +01:00
James Almer
f47d7a3b42 avcodec: move core AVCodecContext functions from util.c to a new file
Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-19 15:35:35 -03:00
Michael Niedermayer
d1fb157dd7 broken mess removial
Originally committed as revision 3539 to svn://svn.ffmpeg.org/ffmpeg/trunk
2004-09-29 23:12:16 +00:00
Michael Niedermayer
23c9925329 libdts support by (Benjamin Zores <ben at geexbox dot org>)
Originally committed as revision 3310 to svn://svn.ffmpeg.org/ffmpeg/trunk
2004-07-14 01:32:14 +00:00
Garrick Meeker
d4f5d74a54 flash video (flv) support patch by (Garrick Meeker <gmeeker at theoryllc dot com>)
Originally committed as revision 2024 to svn://svn.ffmpeg.org/ffmpeg/trunk
2003-07-09 23:10:59 +00:00
Michael Niedermayer
983e3246b7 per file doxy
Originally committed as revision 1634 to svn://svn.ffmpeg.org/ffmpeg/trunk
2003-03-06 11:32:04 +00:00
Zdenek Kabelac
fe1b62fb3e * still unfinished code for Options
* demo code - awating more comments

Originally committed as revision 1569 to svn://svn.ffmpeg.org/ffmpeg/trunk
2003-02-10 09:40:23 +00:00
Zdenek Kabelac
fb602cd15e * useless commit - ignore
Originally committed as revision 1193 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-11-11 09:37:40 +00:00
Zdenek Kabelac
e8f147930b * first shot for the new avcodec API
- comments, critics, improvements on the ffmpeg list are welcomed

Originally committed as revision 494 to svn://svn.ffmpeg.org/ffmpeg/trunk
2002-05-14 14:17:11 +00:00