1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

mpegtsenc: prefer metadata keyed with "service_name"

title metadata is only used as fallback if no service_name is available.

Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
(cherry picked from commit e5fe65512b)
This commit is contained in:
Janne Grunau 2011-01-20 15:03:47 +01:00 committed by Michael Niedermayer
parent d7b219ca96
commit 236bb68d76

View File

@ -400,9 +400,9 @@ static int mpegts_write_header(AVFormatContext *s)
ts->tsid = DEFAULT_TSID;
ts->onid = DEFAULT_ONID;
/* allocate a single DVB service */
title = av_metadata_get(s->metadata, "title", NULL, 0);
title = av_metadata_get(s->metadata, "service_name", NULL, 0);
if (!title)
title = av_metadata_get(s->metadata, "service_name", NULL, 0);
title = av_metadata_get(s->metadata, "title", NULL, 0);
service_name = title ? title->value : DEFAULT_SERVICE_NAME;
provider = av_metadata_get(s->metadata, "service_provider", NULL, 0);
provider_name = provider ? provider->value : DEFAULT_PROVIDER_NAME;