Revision 7916202b libavformat/mpegtsenc.c

View differences:

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