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
62a1e003
Commit
62a1e003
authored
May 11, 2015
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/mlvdec: Use AVFormatContext->open_cb()
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
a228f7d5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
mlvdec.c
libavformat/mlvdec.c
+8
-1
No files found.
libavformat/mlvdec.c
View file @
62a1e003
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
#include "libavutil/intreadwrite.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/rational.h"
#include "libavutil/rational.h"
#include "avformat.h"
#include "avformat.h"
#include "avio_internal.h"
#include "internal.h"
#include "internal.h"
#include "riff.h"
#include "riff.h"
...
@@ -331,11 +332,17 @@ static int read_header(AVFormatContext *avctx)
...
@@ -331,11 +332,17 @@ static int read_header(AVFormatContext *avctx)
if
(
strlen
(
avctx
->
filename
)
>
2
)
{
if
(
strlen
(
avctx
->
filename
)
>
2
)
{
int
i
;
int
i
;
char
*
filename
=
av_strdup
(
avctx
->
filename
);
char
*
filename
=
av_strdup
(
avctx
->
filename
);
AVOpenCallback
open_func
=
avctx
->
open_cb
;
if
(
!
filename
)
if
(
!
filename
)
return
AVERROR
(
ENOMEM
);
return
AVERROR
(
ENOMEM
);
if
(
!
open_func
)
open_func
=
ffio_open2_wrapper
;
for
(
i
=
0
;
i
<
100
;
i
++
)
{
for
(
i
=
0
;
i
<
100
;
i
++
)
{
snprintf
(
filename
+
strlen
(
filename
)
-
2
,
3
,
"%02d"
,
i
);
snprintf
(
filename
+
strlen
(
filename
)
-
2
,
3
,
"%02d"
,
i
);
if
(
avio_open2
(
&
mlv
->
pb
[
i
],
filename
,
AVIO_FLAG_READ
,
&
avctx
->
interrupt_callback
,
NULL
)
<
0
)
if
(
open_func
(
avctx
,
&
mlv
->
pb
[
i
],
filename
,
AVIO_FLAG_READ
,
&
avctx
->
interrupt_callback
,
NULL
)
<
0
)
break
;
break
;
if
(
check_file_header
(
mlv
->
pb
[
i
],
guid
)
<
0
)
{
if
(
check_file_header
(
mlv
->
pb
[
i
],
guid
)
<
0
)
{
av_log
(
avctx
,
AV_LOG_WARNING
,
"ignoring %s; bad format or guid mismatch
\n
"
,
filename
);
av_log
(
avctx
,
AV_LOG_WARNING
,
"ignoring %s; bad format or guid mismatch
\n
"
,
filename
);
...
...
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