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
21732063
Commit
21732063
authored
Jul 07, 2013
by
Martin Storsjö
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
movenc: K&R formatting cosmetics
Signed-off-by:
Martin Storsjö
<
martin@martin.st
>
parent
38e9585d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
198 additions
and
197 deletions
+198
-197
movenc.c
libavformat/movenc.c
+189
-189
movenchint.c
libavformat/movenchint.c
+9
-8
No files found.
libavformat/movenc.c
View file @
21732063
This diff is collapsed.
Click to expand it.
libavformat/movenchint.c
View file @
21732063
...
...
@@ -87,7 +87,7 @@ static void sample_queue_free(HintSampleQueue *queue)
if
(
queue
->
samples
[
i
].
own_data
)
av_free
(
queue
->
samples
[
i
].
data
);
av_freep
(
&
queue
->
samples
);
queue
->
len
=
0
;
queue
->
len
=
0
;
queue
->
size
=
0
;
}
...
...
@@ -104,7 +104,7 @@ static void sample_queue_push(HintSampleQueue *queue, uint8_t *data, int size,
if
(
size
<=
14
)
return
;
if
(
!
queue
->
samples
||
queue
->
len
>=
queue
->
size
)
{
HintSample
*
samples
;
HintSample
*
samples
;
queue
->
size
+=
10
;
samples
=
av_realloc
(
queue
->
samples
,
sizeof
(
HintSample
)
*
queue
->
size
);
if
(
!
samples
)
...
...
@@ -114,7 +114,7 @@ static void sample_queue_push(HintSampleQueue *queue, uint8_t *data, int size,
queue
->
samples
[
queue
->
len
].
data
=
data
;
queue
->
samples
[
queue
->
len
].
size
=
size
;
queue
->
samples
[
queue
->
len
].
sample_number
=
sample
;
queue
->
samples
[
queue
->
len
].
offset
=
0
;
queue
->
samples
[
queue
->
len
].
offset
=
0
;
queue
->
samples
[
queue
->
len
].
own_data
=
0
;
queue
->
len
++
;
}
...
...
@@ -128,7 +128,7 @@ static void sample_queue_retain(HintSampleQueue *queue)
for
(
i
=
0
;
i
<
queue
->
len
;
)
{
HintSample
*
sample
=
&
queue
->
samples
[
i
];
if
(
!
sample
->
own_data
)
{
uint8_t
*
ptr
=
av_malloc
(
sample
->
size
);
uint8_t
*
ptr
=
av_malloc
(
sample
->
size
);
if
(
!
ptr
)
{
/* Unable to allocate memory for this one, remove it */
memmove
(
queue
->
samples
+
i
,
queue
->
samples
+
i
+
1
,
...
...
@@ -344,7 +344,7 @@ static int write_hint_packets(AVIOContext *out, const uint8_t *data,
trk
->
max_packet_size
=
packet_len
;
seq
=
AV_RB16
(
&
data
[
2
]);
ts
=
AV_RB32
(
&
data
[
4
]);
ts
=
AV_RB32
(
&
data
[
4
]);
if
(
trk
->
prev_rtp_ts
==
0
)
trk
->
prev_rtp_ts
=
ts
;
...
...
@@ -417,7 +417,7 @@ int ff_mov_add_hinted_packet(AVFormatContext *s, AVPacket *pkt,
* for next time. */
size
=
avio_close_dyn_buf
(
rtp_ctx
->
pb
,
&
buf
);
if
((
ret
=
ffio_open_dyn_packet_buf
(
&
rtp_ctx
->
pb
,
RTP_MAX_PACKET_SIZE
))
<
0
)
RTP_MAX_PACKET_SIZE
))
<
0
)
goto
done
;
if
(
size
<=
0
)
...
...
@@ -445,8 +445,9 @@ done:
return
ret
;
}
void
ff_mov_close_hinting
(
MOVTrack
*
track
)
{
AVFormatContext
*
rtp_ctx
=
track
->
rtp_ctx
;
void
ff_mov_close_hinting
(
MOVTrack
*
track
)
{
AVFormatContext
*
rtp_ctx
=
track
->
rtp_ctx
;
uint8_t
*
ptr
;
av_freep
(
&
track
->
enc
);
...
...
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