Message ID | 20200420171636.1998-1-ffmpeg@gyani.pro |
---|---|
State | Accepted |
Headers | show |
Series | [FFmpeg-devel] avformat/mpegtsenc: don't print warning for DVB text streams | expand |
Context | Check | Description |
---|---|---|
andriy/default | pending | |
andriy/make | success | Make finished |
andriy/make_fate | success | Make fate finished |
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
On 22-04-2020 01:21 am, Marton Balint wrote: > > > 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. Will apply. > >> 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... In next patch. Thanks, Gyan
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; 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));