[FFmpeg-devel] [PATCH] avformat/mpegtsenc: don't print warning for DVB text streams

Marton Balint cus at passwd.hu
Tue Apr 21 22:51:54 EEST 2020



On Mon, 20 Apr 2020, Gyan Doshi wrote:

> They can be demuxed by ffmpeg.
> ---
> libavformat/mpegtsenc.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
> index ccb631d746..3818001976 100644
> --- a/libavformat/mpegtsenc.c
> +++ b/libavformat/mpegtsenc.c
> @@ -381,6 +381,10 @@ static int mpegts_write_pmt(AVFormatContext *s, MpegTSService *service)
>         case AV_CODEC_ID_TIMED_ID3:
>             stream_type = STREAM_TYPE_METADATA;
>             break;
> +        case AV_CODEC_ID_DVB_SUBTITLE:
> +        case AV_CODEC_ID_DVB_TELETEXT:
> +            stream_type = STREAM_TYPE_PRIVATE_DATA;
> +            break;

LGTM.

>         default:
>             av_log(s, AV_LOG_WARNING, "Stream %d, codec %s, is muxed as a private data stream "
>                    "and may not be recognized upon reading.\n", i, avcodec_get_name(st->codecpar->codec_id));

Preferably av_log_once should be used here with a state variable stored in 
MpegTSWriteStream because it is logged for every PMT...

Thanks,
Marton


More information about the ffmpeg-devel mailing list