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
153b5fb2
Commit
153b5fb2
authored
Jun 13, 2014
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/framecrcenc: print the checksum and size of extradata as well
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
29f427c2
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
31 additions
and
2 deletions
+31
-2
framecrcenc.c
libavformat/framecrcenc.c
+17
-1
iv8-demux
tests/ref/fate/iv8-demux
+1
-0
lmlm4-demux
tests/ref/fate/lmlm4-demux
+1
-0
mkv
tests/ref/fate/mkv
+2
-0
mtv
tests/ref/fate/mtv
+1
-0
mxf-demux
tests/ref/fate/mxf-demux
+1
-0
nc-demux
tests/ref/fate/nc-demux
+1
-0
sub2video
tests/ref/fate/sub2video
+1
-0
vqf-demux
tests/ref/fate/vqf-demux
+1
-1
wmv8-drm-nodec
tests/ref/fate/wmv8-drm-nodec
+2
-0
wtv-demux
tests/ref/fate/wtv-demux
+2
-0
xmv-demux
tests/ref/fate/xmv-demux
+1
-0
No files found.
libavformat/framecrcenc.c
View file @
153b5fb2
...
@@ -26,6 +26,22 @@
...
@@ -26,6 +26,22 @@
#include "avformat.h"
#include "avformat.h"
#include "internal.h"
#include "internal.h"
static
int
framecrc_write_header
(
struct
AVFormatContext
*
s
)
{
int
i
;
for
(
i
=
0
;
i
<
s
->
nb_streams
;
i
++
)
{
AVStream
*
st
=
s
->
streams
[
i
];
AVCodecContext
*
avctx
=
st
->
codec
;
if
(
avctx
->
extradata
)
{
uint32_t
crc
=
av_adler32_update
(
0
,
avctx
->
extradata
,
avctx
->
extradata_size
);
avio_printf
(
s
->
pb
,
"#extradata %d: %8d, 0x%08"
PRIx32
"
\n
"
,
i
,
avctx
->
extradata_size
,
crc
);
}
}
return
ff_framehash_write_header
(
s
);
}
static
int
framecrc_write_packet
(
struct
AVFormatContext
*
s
,
AVPacket
*
pkt
)
static
int
framecrc_write_packet
(
struct
AVFormatContext
*
s
,
AVPacket
*
pkt
)
{
{
uint32_t
crc
=
av_adler32_update
(
0
,
pkt
->
data
,
pkt
->
size
);
uint32_t
crc
=
av_adler32_update
(
0
,
pkt
->
data
,
pkt
->
size
);
...
@@ -65,7 +81,7 @@ AVOutputFormat ff_framecrc_muxer = {
...
@@ -65,7 +81,7 @@ AVOutputFormat ff_framecrc_muxer = {
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"framecrc testing"
),
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"framecrc testing"
),
.
audio_codec
=
AV_CODEC_ID_PCM_S16LE
,
.
audio_codec
=
AV_CODEC_ID_PCM_S16LE
,
.
video_codec
=
AV_CODEC_ID_RAWVIDEO
,
.
video_codec
=
AV_CODEC_ID_RAWVIDEO
,
.
write_header
=
f
f_framehash
_write_header
,
.
write_header
=
f
ramecrc
_write_header
,
.
write_packet
=
framecrc_write_packet
,
.
write_packet
=
framecrc_write_packet
,
.
flags
=
AVFMT_VARIABLE_FPS
|
AVFMT_TS_NONSTRICT
|
.
flags
=
AVFMT_VARIABLE_FPS
|
AVFMT_TS_NONSTRICT
|
AVFMT_TS_NEGATIVE
,
AVFMT_TS_NEGATIVE
,
...
...
tests/ref/fate/iv8-demux
View file @
153b5fb2
#extradata 0: 19, 0x1f2604b9
#tb 0: 1/90000
#tb 0: 1/90000
0, 0, 0, 0, 20883, 0x347191e2
0, 0, 0, 0, 20883, 0x347191e2
0, 0, 3600, 0, 20882, 0xe1573905
0, 0, 3600, 0, 20882, 0xe1573905
...
...
tests/ref/fate/lmlm4-demux
View file @
153b5fb2
#extradata 0: 28, 0x2f140538
#tb 0: 1001/30000
#tb 0: 1001/30000
#tb 1: 1/90000
#tb 1: 1/90000
0, 0, -9223372036854775808, 1, 5951, 0xe9118e0d
0, 0, -9223372036854775808, 1, 5951, 0xe9118e0d
...
...
tests/ref/fate/mkv
View file @
153b5fb2
#extradata 0: 35, 0xc3b20b70
#extradata 1: 2, 0x00b200a1
#tb 0: 1/1000
#tb 0: 1/1000
#tb 1: 1/1000
#tb 1: 1/1000
0, -42, 0, 0, 63501, 0x139d4c99
0, -42, 0, 0, 63501, 0x139d4c99
...
...
tests/ref/fate/mtv
View file @
153b5fb2
#extradata 0: 9, 0x116c033a
#tb 0: 1/16
#tb 0: 1/16
#tb 1: 1/44100
#tb 1: 1/44100
0, 0, 0, 1, 12288, 0xc2258ebc
0, 0, 0, 1, 12288, 0xc2258ebc
...
...
tests/ref/fate/mxf-demux
View file @
153b5fb2
#extradata 0: 18, 0x0b150244
#tb 0: 1/25
#tb 0: 1/25
#tb 1: 1/8000
#tb 1: 1/8000
0, 0, -9223372036854775808, 1, 8468, 0xc0855553
0, 0, -9223372036854775808, 1, 8468, 0xc0855553
...
...
tests/ref/fate/nc-demux
View file @
153b5fb2
#extradata 0: 19, 0x1afd0446
#tb 0: 1/100
#tb 0: 1/100
0, 0, -9223372036854775808, 1, 19787, 0x75e463f3
0, 0, -9223372036854775808, 1, 19787, 0x75e463f3
0, 1, -9223372036854775808, 1, 11913, 0x0f429c34, F=0x0
0, 1, -9223372036854775808, 1, 11913, 0x0f429c34, F=0x0
...
...
tests/ref/fate/sub2video
View file @
153b5fb2
#extradata 1: 150, 0x7c99258b
#tb 0: 1/5
#tb 0: 1/5
#tb 1: 1/1000
#tb 1: 1/1000
0, 0, 0, 1, 518400, 0x83c27b82
0, 0, 0, 1, 518400, 0x83c27b82
...
...
tests/ref/fate/vqf-demux
View file @
153b5fb2
d72fb75fb22f4bcc94a1dc7af5356ec1
084a9bf92d4096c8156d1fce50dac8b8
tests/ref/fate/wmv8-drm-nodec
View file @
153b5fb2
#extradata 0: 4, 0x021800a2
#extradata 1: 46, 0x63d9043a
#tb 0: 1/1000
#tb 0: 1/1000
#tb 1: 1/1000
#tb 1: 1/1000
0, 0, 0, 0, 282, 0x000d949a
0, 0, 0, 0, 282, 0x000d949a
...
...
tests/ref/fate/wtv-demux
View file @
153b5fb2
#extradata 0: 86, 0xc7ca09e5
#extradata 1: 22, 0x12dc010c
#tb 0: 1/10000000
#tb 0: 1/10000000
#tb 1: 1/10000000
#tb 1: 1/10000000
1, -2, -2, 240000, 576, 0x9b6e1638
1, -2, -2, 240000, 576, 0x9b6e1638
...
...
tests/ref/fate/xmv-demux
View file @
153b5fb2
#extradata 0: 4, 0x015a00ad
#tb 0: 1/1000
#tb 0: 1/1000
#tb 1: 16/11025
#tb 1: 16/11025
0, 0, 0, 0, 1508, 0xefceba48
0, 0, 0, 0, 1508, 0xefceba48
...
...
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