aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefano Sabatini <stefasab@gmail.com>2016-04-12 18:14:45 +0200
committerStefano Sabatini <stefasab@gmail.com>2016-11-06 12:36:43 +0100
commit9ccdf04bd0aa9a2fb1005776ced65d082b6afc5a (patch)
tree1a4895d43414adc780850cd1e6d018e968fd588b
parent75a13115cd6b961f4f6779423353c1cf25db4c0e (diff)
downloadffmpeg-9ccdf04bd0aa9a2fb1005776ced65d082b6afc5a.tar.gz
lavf/mpegtsenc: move putstr8 definition up
This allows to use the function in a future commit.
-rw-r--r--libavformat/mpegtsenc.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
index 71a66424be..ca038a625f 100644
--- a/libavformat/mpegtsenc.c
+++ b/libavformat/mpegtsenc.c
@@ -264,6 +264,23 @@ static void mpegts_write_pat(AVFormatContext *s)
data, q - data);
}
+/* NOTE: !str is accepted for an empty string */
+static void putstr8(uint8_t **q_ptr, const char *str)
+{
+ uint8_t *q;
+ int len;
+
+ q = *q_ptr;
+ if (!str)
+ len = 0;
+ else
+ len = strlen(str);
+ *q++ = len;
+ memcpy(q, str, len);
+ q += len;
+ *q_ptr = q;
+}
+
static int mpegts_write_pmt(AVFormatContext *s, MpegTSService *service)
{
MpegTSWrite *ts = s->priv_data;
@@ -646,23 +663,6 @@ static int mpegts_write_pmt(AVFormatContext *s, MpegTSService *service)
return 0;
}
-/* NOTE: !str is accepted for an empty string */
-static void putstr8(uint8_t **q_ptr, const char *str)
-{
- uint8_t *q;
- int len;
-
- q = *q_ptr;
- if (!str)
- len = 0;
- else
- len = strlen(str);
- *q++ = len;
- memcpy(q, str, len);
- q += len;
- *q_ptr = q;
-}
-
static void mpegts_write_sdt(AVFormatContext *s)
{
MpegTSWrite *ts = s->priv_data;