Revision 7916202b

View differences:

libavformat/avformat.h
161 161
 *                 E.g for "Also sprach Zarathustra", artist would be "Richard
162 162
 *                 Strauss" and performer "London Philharmonic Orchestra".
163 163
 * publisher    -- name of the label/publisher.
164
 * service_name     -- name of the service in broadcasting (channel name).
165
 * service_provider -- name of the service provider in broadcasting.
164 166
 * title        -- name of the work.
165 167
 * track        -- number of this work in the set, can be in form current/total.
166 168
 */
libavformat/mpegtsenc.c
391 391
    MpegTSWriteStream *ts_st;
392 392
    MpegTSService *service;
393 393
    AVStream *st, *pcr_st = NULL;
394
    AVMetadataTag *title;
394
    AVMetadataTag *title, *provider;
395 395
    int i, j;
396 396
    const char *service_name;
397
    const char *provider_name;
397 398
    int *pids;
398 399

  
399 400
    ts->tsid = DEFAULT_TSID;
400 401
    ts->onid = DEFAULT_ONID;
401 402
    /* allocate a single DVB service */
402 403
    title = av_metadata_get(s->metadata, "title", NULL, 0);
404
    if (!title)
405
        title = av_metadata_get(s->metadata, "service_name", NULL, 0);
403 406
    service_name = title ? title->value : DEFAULT_SERVICE_NAME;
404
    service = mpegts_add_service(ts, DEFAULT_SID,
405
                                 DEFAULT_PROVIDER_NAME, service_name);
407
    provider = av_metadata_get(s->metadata, "service_provider", NULL, 0);
408
    provider_name = provider ? provider->value : DEFAULT_PROVIDER_NAME;
409
    service = mpegts_add_service(ts, DEFAULT_SID, provider_name, service_name);
406 410
    service->pmt.write_packet = section_write_packet;
407 411
    service->pmt.opaque = s;
408 412
    service->pmt.cc = 15;

Also available in: Unified diff