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
840fb7a7
Commit
840fb7a7
authored
Nov 05, 2005
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
per frame crc support
Originally committed as revision 4677 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
c555392a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
1 deletion
+26
-1
crc.c
libavformat/crc.c
+26
-1
No files found.
libavformat/crc.c
View file @
840fb7a7
...
@@ -83,7 +83,18 @@ static int crc_write_trailer(struct AVFormatContext *s)
...
@@ -83,7 +83,18 @@ static int crc_write_trailer(struct AVFormatContext *s)
CRCState
*
crc
=
s
->
priv_data
;
CRCState
*
crc
=
s
->
priv_data
;
char
buf
[
64
];
char
buf
[
64
];
snprintf
(
buf
,
sizeof
(
buf
),
"CRC=%08x
\n
"
,
crc
->
crcval
);
snprintf
(
buf
,
sizeof
(
buf
),
"CRC=0x%08x
\n
"
,
crc
->
crcval
);
put_buffer
(
&
s
->
pb
,
buf
,
strlen
(
buf
));
put_flush_packet
(
&
s
->
pb
);
return
0
;
}
static
int
framecrc_write_packet
(
struct
AVFormatContext
*
s
,
AVPacket
*
pkt
)
{
uint32_t
crc
=
update_adler32
(
0
,
pkt
->
data
,
pkt
->
size
);
char
buf
[
256
];
snprintf
(
buf
,
sizeof
(
buf
),
"%d, %Ld, %d, 0x%08x
\n
"
,
pkt
->
stream_index
,
pkt
->
dts
,
pkt
->
size
,
crc
);
put_buffer
(
&
s
->
pb
,
buf
,
strlen
(
buf
));
put_buffer
(
&
s
->
pb
,
buf
,
strlen
(
buf
));
put_flush_packet
(
&
s
->
pb
);
put_flush_packet
(
&
s
->
pb
);
return
0
;
return
0
;
...
@@ -102,8 +113,22 @@ static AVOutputFormat crc_format = {
...
@@ -102,8 +113,22 @@ static AVOutputFormat crc_format = {
crc_write_trailer
,
crc_write_trailer
,
};
};
static
AVOutputFormat
framecrc_format
=
{
"framecrc"
,
"framecrc testing format"
,
NULL
,
""
,
0
,
CODEC_ID_PCM_S16LE
,
CODEC_ID_RAWVIDEO
,
NULL
,
framecrc_write_packet
,
NULL
,
};
int
crc_init
(
void
)
int
crc_init
(
void
)
{
{
av_register_output_format
(
&
crc_format
);
av_register_output_format
(
&
crc_format
);
av_register_output_format
(
&
framecrc_format
);
return
0
;
return
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