[FFmpeg-devel] [PATCH v13 1/2] libavformat: add DVD-Video demuxer, powered by libdvdnav and libdvdread
Anton Khirnov
anton at khirnov.net
Fri Feb 16 13:38:43 EET 2024
Quoting Marth64 (2024-02-11 19:09:16)
> +static int dvdvideo_video_stream_add(AVFormatContext *s,
> + DVDVideoVTSVideoStreamEntry *entry,
> + enum AVStreamParseType need_parsing)
> +{
> + AVStream *st;
> + FFStream *sti;
> +
> + st = avformat_new_stream(s, NULL);
> + if (!st)
> + return AVERROR(ENOMEM);
> +
> + st->id = entry->startcode;
> + st->codecpar->codec_type = AVMEDIA_TYPE_VIDEO;
> + st->codecpar->codec_id = entry->codec_id;
> + st->codecpar->width = entry->width;
> + st->codecpar->height = entry->height;
> + st->codecpar->format = AV_PIX_FMT_YUV420P;
> + st->codecpar->color_range = AVCOL_RANGE_MPEG;
> +
> + st->codecpar->framerate = entry->framerate;
Demuxers are not supposed to set this, it's for the codec-layer
framerate information.
> +#if FF_API_R_FRAME_RATE
> + st->r_frame_rate = entry->framerate;
> +#endif
> + st->avg_frame_rate = entry->framerate;
> +
> + sti = ffstream(st);
> + sti->request_probe = 0;
> + sti->need_parsing = need_parsing;
> + sti->display_aspect_ratio = entry->dar;
> + sti->avctx->framerate = entry->framerate;
This neither.
--
Anton Khirnov
More information about the ffmpeg-devel
mailing list