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
f771b3ab
Commit
f771b3ab
authored
Nov 14, 2014
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avidec: do not export stream_codec_tag
Handle its only existing use case internally.
parent
167e004e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
mpeg4videodec.c
libavcodec/mpeg4videodec.c
+1
-2
avidec.c
libavformat/avidec.c
+8
-2
No files found.
libavcodec/mpeg4videodec.c
View file @
f771b3ab
...
...
@@ -2047,8 +2047,7 @@ static int decode_user_data(Mpeg4DecContext *ctx, GetBitContext *gb)
ctx
->
xvid_build
=
build
;
if
(
ctx
->
xvid_build
==
-
1
&&
ctx
->
divx_version
==
-
1
&&
ctx
->
lavc_build
==
-
1
)
{
if
(
s
->
stream_codec_tag
==
AV_RL32
(
"XVID"
)
||
s
->
codec_tag
==
AV_RL32
(
"XVID"
)
||
if
(
s
->
codec_tag
==
AV_RL32
(
"XVID"
)
||
s
->
codec_tag
==
AV_RL32
(
"XVIX"
)
||
s
->
codec_tag
==
AV_RL32
(
"RMP4"
)
||
s
->
codec_tag
==
AV_RL32
(
"ZMP4"
)
||
...
...
libavformat/avidec.c
View file @
f771b3ab
...
...
@@ -42,6 +42,7 @@ typedef struct AVIStream {
int
remaining
;
int
packet_size
;
uint32_t
handler
;
uint32_t
scale
;
uint32_t
rate
;
int
sample_size
;
/* size of one sample (or packet)
...
...
@@ -515,7 +516,7 @@ static int avi_read_header(AVFormatContext *s)
}
assert
(
stream_index
<
s
->
nb_streams
);
st
->
codec
->
stream_codec_tag
=
handler
;
ast
->
handler
=
handler
;
avio_rl32
(
pb
);
/* flags */
avio_rl16
(
pb
);
/* priority */
...
...
@@ -650,6 +651,11 @@ static int avi_read_header(AVFormatContext *s)
/* This is needed to get the pict type which is necessary
* for generating correct pts. */
st
->
need_parsing
=
AVSTREAM_PARSE_HEADERS
;
if
(
st
->
codec
->
codec_id
==
AV_CODEC_ID_MPEG4
&&
ast
->
handler
==
MKTAG
(
'X'
,
'V'
,
'I'
,
'D'
))
st
->
codec
->
codec_tag
=
MKTAG
(
'X'
,
'V'
,
'I'
,
'D'
);
// Support "Resolution 1:1" for Avid AVI Codec
if
(
tag1
==
MKTAG
(
'A'
,
'V'
,
'R'
,
'n'
)
&&
st
->
codec
->
extradata_size
>=
31
&&
...
...
@@ -701,7 +707,7 @@ static int avi_read_header(AVFormatContext *s)
st
->
need_parsing
=
AVSTREAM_PARSE_NONE
;
/* AVI files with Xan DPCM audio (wrongly) declare PCM
* audio in the header but have Axan as stream_code_tag. */
if
(
st
->
codec
->
stream_codec_tag
==
AV_RL32
(
"Axan"
))
{
if
(
ast
->
handler
==
AV_RL32
(
"Axan"
))
{
st
->
codec
->
codec_id
=
AV_CODEC_ID_XAN_DPCM
;
st
->
codec
->
codec_tag
=
0
;
}
...
...
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