On 2/23/22 02:52, Anton Khirnov wrote:
Quoting Andreas Rheinhardt (2022-02-02 03:13:12)
Who sets invalid media types?
(In case of fftools/*: If they don't set it themselves, they (and all
our users) should be able to rely on our libraries to not set invalid
values. The same goes for all demuxers (as they set this value
themselves). Checks are only necessary where the media type comes from
the user; this means muxers (where the check should be done generically)
and possibly avfiltergraph.c (I am pretty sure that the type has already
been checked earlier for filters).)
Some demuxer code in lavf looks like it might result in a TYPE_UNKNOWN
AVStream. E.g. argo_brp, avi, both asfdecs, gxf.

Also, in libavcodec/codec_desc.c, avcodec_get_type(AV_CODEC_ID_NONE) will return AVMEDIA_TYPE_UNKNOWN.  The mpegts demuxer, for example, will set (or more likely leave) AV_CODEC_ID_NONE as the AVCodecID of a stream if it can't identify the codec.  This is probably true of all demuxers.

-Scott Theisen
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to