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
5d2f89a2
Commit
5d2f89a2
authored
Aug 05, 2012
by
Piotr Bandurski
Committed by
Carl Eugen Hoyos
Aug 05, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
movenc: fix remuxing of svq3
parent
b4780d03
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
42 deletions
+8
-42
mov.c
libavformat/mov.c
+6
-26
movenc.c
libavformat/movenc.c
+2
-16
No files found.
libavformat/mov.c
View file @
5d2f89a2
...
...
@@ -802,31 +802,6 @@ static int mov_read_mvhd(MOVContext *c, AVIOContext *pb, MOVAtom atom)
return
0
;
}
static
int
mov_read_smi
(
MOVContext
*
c
,
AVIOContext
*
pb
,
MOVAtom
atom
)
{
AVStream
*
st
;
if
(
c
->
fc
->
nb_streams
<
1
)
return
0
;
st
=
c
->
fc
->
streams
[
c
->
fc
->
nb_streams
-
1
];
if
((
uint64_t
)
atom
.
size
>
(
1
<<
30
))
return
AVERROR_INVALIDDATA
;
// currently SVQ3 decoder expect full STSD header - so let's fake it
// this should be fixed and just SMI header should be passed
av_free
(
st
->
codec
->
extradata
);
st
->
codec
->
extradata_size
=
0
;
st
->
codec
->
extradata
=
av_mallocz
(
atom
.
size
+
0x5a
+
FF_INPUT_BUFFER_PADDING_SIZE
);
if
(
!
st
->
codec
->
extradata
)
return
AVERROR
(
ENOMEM
);
st
->
codec
->
extradata_size
=
0x5a
+
atom
.
size
;
memcpy
(
st
->
codec
->
extradata
,
"SVQ3"
,
4
);
// fake
avio_read
(
pb
,
st
->
codec
->
extradata
+
0x5a
,
atom
.
size
);
av_dlog
(
c
->
fc
,
"Reading SMI %"
PRId64
" %s
\n
"
,
atom
.
size
,
st
->
codec
->
extradata
+
0x5a
);
return
0
;
}
static
int
mov_read_enda
(
MOVContext
*
c
,
AVIOContext
*
pb
,
MOVAtom
atom
)
{
AVStream
*
st
;
...
...
@@ -944,6 +919,11 @@ static int mov_read_avid(MOVContext *c, AVIOContext *pb, MOVAtom atom)
return
mov_read_extradata
(
c
,
pb
,
atom
,
CODEC_ID_AVUI
);
}
static
int
mov_read_svq3
(
MOVContext
*
c
,
AVIOContext
*
pb
,
MOVAtom
atom
)
{
return
mov_read_extradata
(
c
,
pb
,
atom
,
CODEC_ID_SVQ3
);
}
static
int
mov_read_wave
(
MOVContext
*
c
,
AVIOContext
*
pb
,
MOVAtom
atom
)
{
AVStream
*
st
;
...
...
@@ -2577,7 +2557,7 @@ static const MOVParseTableEntry mov_default_parse_table[] = {
{
MKTAG
(
'm'
,
'o'
,
'o'
,
'v'
),
mov_read_moov
},
{
MKTAG
(
'm'
,
'v'
,
'e'
,
'x'
),
mov_read_default
},
{
MKTAG
(
'm'
,
'v'
,
'h'
,
'd'
),
mov_read_mvhd
},
{
MKTAG
(
'S'
,
'M'
,
'I'
,
' '
),
mov_read_s
mi
},
/* Sorenson extension ??? */
{
MKTAG
(
'S'
,
'M'
,
'I'
,
' '
),
mov_read_s
vq3
},
{
MKTAG
(
'a'
,
'l'
,
'a'
,
'c'
),
mov_read_alac
},
/* alac specific atom */
{
MKTAG
(
'a'
,
'v'
,
'c'
,
'C'
),
mov_read_glbl
},
{
MKTAG
(
'p'
,
'a'
,
's'
,
'p'
),
mov_read_pasp
},
...
...
libavformat/movenc.c
View file @
5d2f89a2
...
...
@@ -712,19 +712,6 @@ static int mov_write_d263_tag(AVIOContext *pb)
return
0xf
;
}
/* TODO: No idea about these values */
static
int
mov_write_svq3_tag
(
AVIOContext
*
pb
)
{
avio_wb32
(
pb
,
0x15
);
ffio_wfourcc
(
pb
,
"SMI "
);
ffio_wfourcc
(
pb
,
"SEQH"
);
avio_wb32
(
pb
,
0x5
);
avio_wb32
(
pb
,
0xe2c0211d
);
avio_wb32
(
pb
,
0xc0000000
);
avio_w8
(
pb
,
0
);
return
0x15
;
}
static
int
mov_write_avcc_tag
(
AVIOContext
*
pb
,
MOVTrack
*
track
)
{
int64_t
pos
=
avio_tell
(
pb
);
...
...
@@ -1071,9 +1058,8 @@ static int mov_write_video_tag(AVIOContext *pb, MOVTrack *track)
mov_write_esds_tag
(
pb
,
track
);
else
if
(
track
->
enc
->
codec_id
==
CODEC_ID_H263
)
mov_write_d263_tag
(
pb
);
else
if
(
track
->
enc
->
codec_id
==
CODEC_ID_SVQ3
)
mov_write_svq3_tag
(
pb
);
else
if
(
track
->
enc
->
codec_id
==
CODEC_ID_AVUI
)
{
else
if
(
track
->
enc
->
codec_id
==
CODEC_ID_AVUI
||
track
->
enc
->
codec_id
==
CODEC_ID_SVQ3
)
{
mov_write_extradata_tag
(
pb
,
track
);
avio_wb32
(
pb
,
0
);
}
else
if
(
track
->
enc
->
codec_id
==
CODEC_ID_DNXHD
)
...
...
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