Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
5c515b5f
Commit
5c515b5f
authored
Feb 09, 2019
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavf/mpegts: Convert service_name and service_provider to utf-8.
Fixes ticket #6320.
parent
5b32f94b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
1 deletion
+45
-1
mpegts.c
libavformat/mpegts.c
+44
-0
version.h
libavformat/version.h
+1
-1
No files found.
libavformat/mpegts.c
View file @
5c515b5f
...
...
@@ -37,6 +37,9 @@
#include "avio_internal.h"
#include "mpeg.h"
#include "isom.h"
#if CONFIG_ICONV
#include <iconv.h>
#endif
/* maximum size in which we look for synchronization if
* synchronization is lost */
...
...
@@ -674,6 +677,47 @@ static char *getstr8(const uint8_t **pp, const uint8_t *p_end)
return
NULL
;
if
(
len
>
p_end
-
p
)
return
NULL
;
#if CONFIG_ICONV
if
(
len
&&
*
p
<
0x20
)
{
const
char
*
encodings
[]
=
{
"ISO6937"
,
"ISO-8859-5"
,
"ISO-8859-6"
,
"ISO-8859-7"
,
"ISO-8859-8"
,
"ISO-8859-9"
,
"ISO-8859-10"
,
"ISO-8859-11"
,
""
,
"ISO-8859-13"
,
"ISO-8859-14"
,
"ISO-8859-15"
,
""
,
""
,
""
,
""
,
""
,
"ISO-10646"
,
"KSC_5601"
,
"GB2312"
,
"UCS-2BE"
,
"UTF-8"
,
""
,
""
,
""
,
""
,
""
,
""
,
""
,
""
,
""
,
""
};
iconv_t
cd
;
char
*
in
,
*
out
;
size_t
inlen
=
len
-
1
,
outlen
=
inlen
*
6
+
1
;
if
(
len
>=
3
&&
p
[
0
]
==
0x10
&&
!
p
[
1
]
&&
p
[
2
]
&&
p
[
2
]
<=
0xf
&&
p
[
2
]
!=
0xc
)
{
char
iso8859
[
12
];
snprintf
(
iso8859
,
sizeof
(
iso8859
),
"ISO-8859-%d"
,
p
[
2
]);
inlen
-=
2
;
in
=
(
char
*
)
p
+
3
;
cd
=
iconv_open
(
"UTF-8"
,
iso8859
);
}
else
{
in
=
(
char
*
)
p
+
1
;
cd
=
iconv_open
(
"UTF-8"
,
encodings
[
*
p
]);
}
if
(
cd
==
(
iconv_t
)
-
1
)
goto
no_iconv
;
str
=
out
=
av_malloc
(
outlen
);
if
(
!
str
)
{
iconv_close
(
cd
);
return
NULL
;
}
if
(
iconv
(
cd
,
&
in
,
&
inlen
,
&
out
,
&
outlen
)
==
-
1
)
{
iconv_close
(
cd
);
av_freep
(
&
str
);
goto
no_iconv
;
}
iconv_close
(
cd
);
*
out
=
0
;
*
pp
=
p
+
len
;
return
str
;
}
no_iconv:
#endif
str
=
av_malloc
(
len
+
1
);
if
(
!
str
)
return
NULL
;
...
...
libavformat/version.h
View file @
5c515b5f
...
...
@@ -33,7 +33,7 @@
// Also please add any ticket numbers that you believe might be affected here
#define LIBAVFORMAT_VERSION_MAJOR 58
#define LIBAVFORMAT_VERSION_MINOR 26
#define LIBAVFORMAT_VERSION_MICRO 10
0
#define LIBAVFORMAT_VERSION_MICRO 10
1
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
LIBAVFORMAT_VERSION_MINOR, \
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment