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
0f97c501
Commit
0f97c501
authored
Sep 14, 2011
by
Justin Ruggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shorten: only calculate output size when returning decoded samples, otherwise
just set data_size to zero.
parent
e9e37f2d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
shorten.c
libavcodec/shorten.c
+6
-4
No files found.
libavcodec/shorten.c
View file @
0f97c501
...
...
@@ -385,6 +385,7 @@ static int shorten_decode_frame(AVCodecContext *avctx,
int
ret
;
if
((
ret
=
read_header
(
s
))
<
0
)
return
ret
;
*
data_size
=
0
;
}
else
{
...
...
@@ -423,8 +424,9 @@ static int shorten_decode_frame(AVCodecContext *avctx,
break
;
}
case
FN_QUIT
:
goto
frame_done
;
break
;
}
*
data_size
=
0
;
}
else
{
/* process audio command */
int
residual_size
=
0
;
...
...
@@ -510,12 +512,12 @@ static int shorten_decode_frame(AVCodecContext *avctx,
if
(
s
->
cur_chan
==
s
->
channels
)
{
samples
=
interleave_buffer
(
samples
,
s
->
channels
,
s
->
blocksize
,
s
->
decoded
);
s
->
cur_chan
=
0
;
goto
frame_done
;
*
data_size
=
(
int8_t
*
)
samples
-
(
int8_t
*
)
data
;
}
else
{
*
data_size
=
0
;
}
}
}
frame_done:
*
data_size
=
(
int8_t
*
)
samples
-
(
int8_t
*
)
data
;
// s->last_blocksize = s->blocksize;
s
->
bitindex
=
get_bits_count
(
&
s
->
gb
)
-
8
*
((
get_bits_count
(
&
s
->
gb
))
/
8
);
...
...
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