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>
This commit is contained in:
Janne Grunau 2011-01-20 15:03:47 +01:00
parent e8315e7881
commit e5fe65512b
1 changed files with 2 additions and 2 deletions

View File

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