[FFmpeg-devel] [PATCH 2/2] Set stream_id correctly based on KLV profile selected.
Marton Balint
cus at passwd.hu
Wed May 27 09:57:17 EEST 2020
On Wed, 27 May 2020, Brad Hards wrote:
> Previously we always set STREAM_TYPE_PRIVATE_DATA, and that remains
> the default value.
> ---
> libavformat/mpegtsenc.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
> index bf1a7ee13f..a7703ab120 100644
> --- a/libavformat/mpegtsenc.c
> +++ b/libavformat/mpegtsenc.c
> @@ -353,6 +353,12 @@ static int get_dvb_stream_type(AVFormatContext *s, AVStream *st)
> case AV_CODEC_ID_DVB_TELETEXT:
> stream_type = STREAM_TYPE_PRIVATE_DATA;
> break;
> + case AV_CODEC_ID_SMPTE_KLV:
> + if ( st->codecpar->profile == FF_PROFILE_KLVA_SYNC ) {
Unneeded whitespace inside the parenthesis.
> + stream_type = STREAM_TYPE_METADATA;
> + } else {
> + stream_type = STREAM_TYPE_PRIVATE_DATA;
> + }
I think a break is missing here, you don't want to warn if the stream
stream type is not private data or if you knowingly use private data
because that is what is supposed to be used.
Regards,
Marton
> default:
> av_log_once(s, AV_LOG_WARNING, AV_LOG_DEBUG, &ts_st->data_st_warning,
> "Stream %d, codec %s, is muxed as a private data stream "
> --
> 2.17.1
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
More information about the ffmpeg-devel
mailing list