Commit f0b3b550 authored by Gyan Doshi's avatar Gyan Doshi

avformat/mpegtsenc: warn users if codec isn't supported

The MPEG-TS muxer will mux streams with unsupported codec id
as a private data stream; this usually makes the stream
not recognizable by ffmpeg and likely other tools.
parent c75f246a
...@@ -382,6 +382,8 @@ static int mpegts_write_pmt(AVFormatContext *s, MpegTSService *service) ...@@ -382,6 +382,8 @@ static int mpegts_write_pmt(AVFormatContext *s, MpegTSService *service)
stream_type = STREAM_TYPE_METADATA; stream_type = STREAM_TYPE_METADATA;
break; break;
default: 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));
stream_type = STREAM_TYPE_PRIVATE_DATA; stream_type = STREAM_TYPE_PRIVATE_DATA;
break; break;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment