avcodec/codec_desc: make LCEVC a video media type

Every container signals it as such, and the data media stream type is too
undefined and unsupported across the codebase that even if no standalone
decoder can be present for it, it's preferable to it.

This is technically an API break, but LCEVC support has been minimal until
now so it should be safe.

Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer
2026-03-06 10:28:52 -03:00
parent c6057f4d96
commit 58052b484e
4 changed files with 5 additions and 9 deletions

View File

@@ -3838,9 +3838,10 @@ static const AVCodecDescriptor codec_descriptors[] = {
},
{
.id = AV_CODEC_ID_LCEVC,
.type = AVMEDIA_TYPE_DATA,
.type = AVMEDIA_TYPE_VIDEO,
.name = "lcevc",
.long_name = NULL_IF_CONFIG_SMALL("LCEVC (Low Complexity Enhancement Video Coding) / MPEG-5 LCEVC / MPEG-5 part 2"),
.props = AV_CODEC_PROP_ENHANCEMENT,
},
{
.id = AV_CODEC_ID_SMPTE_436M_ANC,

View File

@@ -30,7 +30,7 @@
#include "version_major.h"
#define LIBAVCODEC_VERSION_MINOR 26
#define LIBAVCODEC_VERSION_MICRO 100
#define LIBAVCODEC_VERSION_MICRO 101
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \

View File

@@ -1065,9 +1065,8 @@ typedef struct AVStreamGroupTileGrid {
* AVStreamGroupLCEVC is meant to define the relation between video streams
* and a data stream containing LCEVC enhancement layer NALUs.
*
* No more than one stream of @ref AVCodecParameters.codec_type "codec_type"
* AVMEDIA_TYPE_DATA shall be present, and it must be of
* @ref AVCodecParameters.codec_id "codec_id" AV_CODEC_ID_LCEVC.
* No more than one stream of
* @ref AVCodecParameters.codec_id "codec_id" AV_CODEC_ID_LCEVC shall be present.
*/
typedef struct AVStreamGroupLCEVC {
const AVClass *av_class;

View File

@@ -10802,8 +10802,6 @@ static int mov_parse_lcevc_streams(AVFormatContext *s)
!(sc->tref_flags & MOV_TREF_FLAG_ENHANCEMENT))
continue;
st->codecpar->codec_type = AVMEDIA_TYPE_DATA;
stg = avformat_stream_group_create(s, AV_STREAM_GROUP_PARAMS_LCEVC, NULL);
if (!stg)
return AVERROR(ENOMEM);
@@ -10811,8 +10809,6 @@ static int mov_parse_lcevc_streams(AVFormatContext *s)
stg->id = st->id;
stg->params.lcevc->width = st->codecpar->width;
stg->params.lcevc->height = st->codecpar->height;
st->codecpar->width = 0;
st->codecpar->height = 0;
while (st_base = mov_find_reference_track(s, st, j)) {
err = avformat_stream_group_add_stream(stg, st_base);