From ab6492c0713be41c7be20991b5af51d0e1a7a429 Mon Sep 17 00:00:00 2001
From: Jernej Virag <jernej@virag.si>
Date: Thu, 13 Dec 2012 10:54:03 +0100
Subject: [PATCH] SAP muxer set session name from metadata
Pass "title" metadata field to av_sdp_create in SAP muxer for correct
SDP session name.
---
libavformat/sapenc.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/libavformat/sapenc.c b/libavformat/sapenc.c
index 7abfd50..afe2533 100644
|
a
|
b
|
|
| 25 | 25 | #include "libavutil/avstring.h" |
| 26 | 26 | #include "libavutil/intreadwrite.h" |
| 27 | 27 | #include "libavutil/time.h" |
| | 28 | #include "libavutil/dict.h" |
| 28 | 29 | #include "internal.h" |
| 29 | 30 | #include "network.h" |
| 30 | 31 | #include "os_support.h" |
| … |
… |
static int sap_write_header(AVFormatContext *s) |
| 158 | 159 | av_strlcpy(contexts[i]->filename, url, sizeof(contexts[i]->filename)); |
| 159 | 160 | } |
| 160 | 161 | |
| | 162 | AVDictionaryEntry* title = av_dict_get(s->metadata, "title", NULL, 0); |
| | 163 | if (s->nb_streams > 0 && title) { |
| | 164 | av_dict_set(&contexts[0]->metadata, "title", title->value, 0); |
| | 165 | } |
| | 166 | |
| 161 | 167 | ff_url_join(url, sizeof(url), "udp", NULL, announce_addr, port, |
| 162 | 168 | "?ttl=%d&connect=1", ttl); |
| 163 | 169 | ret = ffurl_open(&sap->ann_fd, url, AVIO_FLAG_WRITE, |