Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
b8351ea0
Commit
b8351ea0
authored
Mar 21, 2018
by
Baptiste Coudurier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/audiointerleave: pad last audio frame
parent
24b24e14
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
audiointerleave.c
libavformat/audiointerleave.c
+7
-3
mxf
tests/ref/lavf/mxf
+2
-2
No files found.
libavformat/audiointerleave.c
View file @
b8351ea0
...
...
@@ -81,15 +81,19 @@ static int interleave_new_audio_packet(AVFormatContext *s, AVPacket *pkt,
AVStream
*
st
=
s
->
streams
[
stream_index
];
AudioInterleaveContext
*
aic
=
st
->
priv_data
;
int
ret
;
int
size
=
FFMIN
(
av_fifo_size
(
aic
->
fifo
),
*
aic
->
samples
*
aic
->
sample_size
);
int
frame_size
=
*
aic
->
samples
*
aic
->
sample_size
;
int
size
=
FFMIN
(
av_fifo_size
(
aic
->
fifo
),
frame_size
);
if
(
!
size
||
(
!
flush
&&
size
==
av_fifo_size
(
aic
->
fifo
)))
return
0
;
ret
=
av_new_packet
(
pkt
,
size
);
ret
=
av_new_packet
(
pkt
,
frame_
size
);
if
(
ret
<
0
)
return
ret
;
av_fifo_generic_read
(
aic
->
fifo
,
pkt
->
data
,
size
,
NULL
);
if
(
size
<
pkt
->
size
)
memset
(
pkt
->
data
+
size
,
0
,
pkt
->
size
-
size
);
pkt
->
dts
=
pkt
->
pts
=
aic
->
dts
;
pkt
->
duration
=
av_rescale_q
(
*
aic
->
samples
,
st
->
time_base
,
aic
->
time_base
);
pkt
->
stream_index
=
stream_index
;
...
...
@@ -99,7 +103,7 @@ static int interleave_new_audio_packet(AVFormatContext *s, AVPacket *pkt,
if
(
!*
aic
->
samples
)
aic
->
samples
=
aic
->
samples_per_frame
;
return
size
;
return
pkt
->
size
;
}
int
ff_audio_rechunk_interleave
(
AVFormatContext
*
s
,
AVPacket
*
out
,
AVPacket
*
pkt
,
int
flush
,
...
...
tests/ref/lavf/mxf
View file @
b8351ea0
93367bc02b8997b84224e7eb359cae8a *./tests/data/lavf/lavf.mxf
526393 ./tests/data/lavf/lavf.mxf
./tests/data/lavf/lavf.mxf CRC=0x8dddfaab
0
087ea968d20cc9192456fcd4c00019e
*./tests/data/lavf/lavf.mxf
0
e6d7a2a2c99a2a168114698be4c645f
*./tests/data/lavf/lavf.mxf
561721 ./tests/data/lavf/lavf.mxf
./tests/data/lavf/lavf.mxf CRC=0x
f21b
1b48
./tests/data/lavf/lavf.mxf CRC=0x
96ff
1b48
7754550ff6fe5895555610f586a15fc5 *./tests/data/lavf/lavf.mxf
526393 ./tests/data/lavf/lavf.mxf
./tests/data/lavf/lavf.mxf CRC=0x8dddfaab
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