[FFmpeg-devel] [PATCH] mpegtsenc: prefer metadata keyed with "service_name"
Janne Grunau
janne-ffmpeg
Thu Jan 20 15:11:37 CET 2011
If metadata for service_name is available we should youse that and only
use title as fallback.
---
libavformat/mpegtsenc.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
index 14bbd62..f33b6c6 100644
--- a/libavformat/mpegtsenc.c
+++ b/libavformat/mpegtsenc.c
@@ -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;
--
1.7.4.rc2
More information about the ffmpeg-devel
mailing list