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
6691eee4
Commit
6691eee4
authored
Jul 04, 2014
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/img2dec: avoid seekback on probeing
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
726e253b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
img2dec.c
libavformat/img2dec.c
+2
-3
No files found.
libavformat/img2dec.c
View file @
6691eee4
...
...
@@ -29,6 +29,7 @@
#include "libavutil/parseutils.h"
#include "libavutil/intreadwrite.h"
#include "avformat.h"
#include "avio_internal.h"
#include "internal.h"
#include "img2.h"
...
...
@@ -308,7 +309,6 @@ int ff_img_read_header(AVFormatContext *s1)
uint8_t
*
probe_buffer
=
av_realloc
(
NULL
,
probe_buffer_size
+
AVPROBE_PADDING_SIZE
);
AVInputFormat
*
fmt
=
NULL
;
AVProbeData
pd
;
int
ret
;
if
(
!
probe_buffer
)
return
AVERROR
(
ENOMEM
);
...
...
@@ -319,7 +319,6 @@ int ff_img_read_header(AVFormatContext *s1)
return
probe_buffer_size
;
}
memset
(
probe_buffer
+
probe_buffer_size
,
0
,
AVPROBE_PADDING_SIZE
);
avio_seek
(
s1
->
pb
,
-
8
,
SEEK_CUR
);
pd
.
buf
=
probe_buffer
;
pd
.
buf_size
=
8
;
...
...
@@ -336,7 +335,7 @@ int ff_img_read_header(AVFormatContext *s1)
break
;
}
}
av_free
(
probe_buffer
);
ffio_rewind_with_probe_data
(
s1
->
pb
,
&
probe_buffer
,
probe_buffer_size
);
}
if
(
st
->
codec
->
codec_id
==
AV_CODEC_ID_NONE
)
st
->
codec
->
codec_id
=
ff_guess_image2_codec
(
s
->
path
);
...
...
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