Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Releases
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefan Westerfeld
ffmpeg
Commits
76853a3e
Commit
76853a3e
authored
May 30, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libavformat: ff_get_bmp_header: return esize too
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
a1fc1d2e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
5 deletions
+7
-5
avidec.c
libavformat/avidec.c
+2
-1
riff.c
libavformat/riff.c
+3
-2
riff.h
libavformat/riff.h
+1
-1
wtvdec.c
libavformat/wtvdec.c
+1
-1
No files found.
libavformat/avidec.c
View file @
76853a3e
...
...
@@ -578,6 +578,7 @@ static int avi_read_header(AVFormatContext *s)
avio_skip
(
pb
,
size
);
}
else
{
uint64_t
cur_pos
=
avio_tell
(
pb
);
unsigned
esize
;
if
(
cur_pos
<
list_end
)
size
=
FFMIN
(
size
,
list_end
-
cur_pos
);
st
=
s
->
streams
[
stream_index
];
...
...
@@ -591,7 +592,7 @@ static int avi_read_header(AVFormatContext *s)
avio_skip
(
pb
,
size
);
break
;
}
tag1
=
ff_get_bmp_header
(
pb
,
st
);
tag1
=
ff_get_bmp_header
(
pb
,
st
,
&
esize
);
if
(
tag1
==
MKTAG
(
'D'
,
'X'
,
'S'
,
'B'
)
||
tag1
==
MKTAG
(
'D'
,
'X'
,
'S'
,
'A'
))
{
st
->
codec
->
codec_type
=
AVMEDIA_TYPE_SUBTITLE
;
...
...
libavformat/riff.c
View file @
76853a3e
...
...
@@ -653,10 +653,11 @@ enum CodecID ff_wav_codec_get_id(unsigned int tag, int bps)
return
id
;
}
int
ff_get_bmp_header
(
AVIOContext
*
pb
,
AVStream
*
st
)
int
ff_get_bmp_header
(
AVIOContext
*
pb
,
AVStream
*
st
,
unsigned
*
esize
)
{
int
tag1
;
avio_rl32
(
pb
);
/* size */
if
(
esize
)
*
esize
=
avio_rl32
(
pb
);
else
avio_rl32
(
pb
);
st
->
codec
->
width
=
avio_rl32
(
pb
);
st
->
codec
->
height
=
(
int32_t
)
avio_rl32
(
pb
);
avio_rl16
(
pb
);
/* planes */
...
...
libavformat/riff.h
View file @
76853a3e
...
...
@@ -44,7 +44,7 @@ void ff_end_tag(AVIOContext *pb, int64_t start);
* bits_per_encoded_sample fields. Does not read extradata.
* @return codec tag
*/
int
ff_get_bmp_header
(
AVIOContext
*
pb
,
AVStream
*
st
);
int
ff_get_bmp_header
(
AVIOContext
*
pb
,
AVStream
*
st
,
unsigned
*
esize
);
void
ff_put_bmp_header
(
AVIOContext
*
pb
,
AVCodecContext
*
enc
,
const
AVCodecTag
*
tags
,
int
for_asf
);
int
ff_put_wav_header
(
AVIOContext
*
pb
,
AVCodecContext
*
enc
);
...
...
libavformat/wtvdec.c
View file @
76853a3e
...
...
@@ -522,7 +522,7 @@ static int parse_videoinfoheader2(AVFormatContext *s, AVStream *st)
AVIOContext
*
pb
=
wtv
->
pb
;
avio_skip
(
pb
,
72
);
// picture aspect ratio is unreliable
ff_get_bmp_header
(
pb
,
st
);
ff_get_bmp_header
(
pb
,
st
,
NULL
);
return
72
+
40
;
}
...
...
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