You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
lavf/mpegtsenc: move putstr8 definition up
This allows to use the function in a future commit.
This commit is contained in:
@@ -264,6 +264,23 @@ static void mpegts_write_pat(AVFormatContext *s)
|
|||||||
data, q - data);
|
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)
|
static int mpegts_write_pmt(AVFormatContext *s, MpegTSService *service)
|
||||||
{
|
{
|
||||||
MpegTSWrite *ts = s->priv_data;
|
MpegTSWrite *ts = s->priv_data;
|
||||||
@@ -646,23 +663,6 @@ static int mpegts_write_pmt(AVFormatContext *s, MpegTSService *service)
|
|||||||
return 0;
|
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)
|
static void mpegts_write_sdt(AVFormatContext *s)
|
||||||
{
|
{
|
||||||
MpegTSWrite *ts = s->priv_data;
|
MpegTSWrite *ts = s->priv_data;
|
||||||
|
Reference in New Issue
Block a user