1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +02:00

avformat/movenc: look for the Intra profile flag before assuming a stream is AVC-Intra

Fixes issue #20018.

Note that Codec Descriptors are not written for all these ai** codec tags, and no
considerations were ever made to ensure parameter sets are present in muxed packets.
Their usage may result in unplayable files if parameter sets are only available
in extradata (Default behavior for x264 encoding when combined with this muxer).

Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer
2025-07-31 21:12:55 -03:00
committed by kierank
parent ab73bd94a3
commit 9aed7383bd

View File

@ -1879,6 +1879,10 @@ static int mov_get_h264_codec_tag(AVFormatContext *s, MOVTrack *track)
if (!tag) if (!tag)
tag = MKTAG('a', 'v', 'c', 'i'); //fallback tag tag = MKTAG('a', 'v', 'c', 'i'); //fallback tag
if (track->par->profile == AV_PROFILE_UNKNOWN ||
!(track->par->profile & AV_PROFILE_H264_INTRA))
return tag;
if (track->par->format == AV_PIX_FMT_YUV420P10) { if (track->par->format == AV_PIX_FMT_YUV420P10) {
if (track->par->width == 960 && track->par->height == 720) { if (track->par->width == 960 && track->par->height == 720) {
if (!interlaced) { if (!interlaced) {