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
06f65fd0
Commit
06f65fd0
authored
Jan 25, 2016
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/dcaenc: return correct number of bytes in output packet
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
ed0c5505
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
dcaenc.c
libavcodec/dcaenc.c
+2
-2
acodec.mak
tests/fate/acodec.mak
+1
-1
No files found.
libavcodec/dcaenc.c
View file @
06f65fd0
...
@@ -938,7 +938,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
...
@@ -938,7 +938,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
const
int32_t
*
samples
;
const
int32_t
*
samples
;
int
ret
,
i
;
int
ret
,
i
;
if
((
ret
=
ff_alloc_packet2
(
avctx
,
avpkt
,
c
->
frame_size
,
0
))
<
0
)
if
((
ret
=
ff_alloc_packet2
(
avctx
,
avpkt
,
c
->
frame_size
,
0
))
<
0
)
return
ret
;
return
ret
;
samples
=
(
const
int32_t
*
)
frame
->
data
[
0
];
samples
=
(
const
int32_t
*
)
frame
->
data
[
0
];
...
@@ -968,7 +968,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
...
@@ -968,7 +968,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
avpkt
->
pts
=
frame
->
pts
;
avpkt
->
pts
=
frame
->
pts
;
avpkt
->
duration
=
ff_samples_to_time_base
(
avctx
,
frame
->
nb_samples
);
avpkt
->
duration
=
ff_samples_to_time_base
(
avctx
,
frame
->
nb_samples
);
avpkt
->
size
=
c
->
frame_size
+
1
;
avpkt
->
size
=
put_bits_count
(
&
c
->
pb
)
>>
3
;
*
got_packet_ptr
=
1
;
*
got_packet_ptr
=
1
;
return
0
;
return
0
;
}
}
...
...
tests/fate/acodec.mak
View file @
06f65fd0
...
@@ -104,7 +104,7 @@ fate-acodec-dca: tests/data/asynth-44100-2.wav
...
@@ -104,7 +104,7 @@ fate-acodec-dca: tests/data/asynth-44100-2.wav
fate-acodec-dca: SRC = tests/data/asynth-44100-2.wav
fate-acodec-dca: SRC = tests/data/asynth-44100-2.wav
fate-acodec-dca: CMD = md5 -i $(TARGET_PATH)/$(SRC) -c:a dca -strict -2 -f dts -flags +bitexact
fate-acodec-dca: CMD = md5 -i $(TARGET_PATH)/$(SRC) -c:a dca -strict -2 -f dts -flags +bitexact
fate-acodec-dca: CMP = oneline
fate-acodec-dca: CMP = oneline
fate-acodec-dca: REF =
c54ca9a13711755ef90fa143a9b38386
fate-acodec-dca: REF =
7ffdefdf47069289990755c79387cc90
FATE_ACODEC-$(call ENCDEC, DCA, WAV) += fate-acodec-dca2
FATE_ACODEC-$(call ENCDEC, DCA, WAV) += fate-acodec-dca2
fate-acodec-dca2: CMD = enc_dec_pcm dts wav s16le $(SRC) -c:a dca -strict -2 -flags +bitexact
fate-acodec-dca2: CMD = enc_dec_pcm dts wav s16le $(SRC) -c:a dca -strict -2 -flags +bitexact
...
...
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