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
60b75186
Commit
60b75186
authored
Apr 10, 2016
by
Jakub Stachowski
Committed by
Paul B Mahol
Apr 10, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/wmalosslessdec: do not discard last frame
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
571aa7d2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
wmalosslessdec.c
libavcodec/wmalosslessdec.c
+9
-2
No files found.
libavcodec/wmalosslessdec.c
View file @
60b75186
...
...
@@ -1043,6 +1043,9 @@ static int decode_frame(WmallDecodeCtx *s)
if
(
get_bits1
(
gb
))
{
skip
=
get_bits
(
gb
,
av_log2
(
s
->
samples_per_frame
*
2
));
ff_dlog
(
s
->
avctx
,
"end skip: %i
\n
"
,
skip
);
s
->
frame
->
nb_samples
-=
skip
;
if
(
s
->
frame
->
nb_samples
<=
0
)
return
AVERROR_INVALIDDATA
;
}
}
...
...
@@ -1163,7 +1166,11 @@ static int decode_packet(AVCodecContext *avctx, void *data, int *got_frame_ptr,
s
->
frame
->
nb_samples
=
0
;
if
(
s
->
packet_done
||
s
->
packet_loss
)
{
if
(
!
buf_size
&&
s
->
num_saved_bits
>
get_bits_count
(
&
s
->
gb
))
{
s
->
packet_done
=
0
;
if
(
!
decode_frame
(
s
))
s
->
num_saved_bits
=
0
;
}
else
if
(
s
->
packet_done
||
s
->
packet_loss
)
{
s
->
packet_done
=
0
;
if
(
!
buf_size
)
...
...
@@ -1264,7 +1271,7 @@ static int decode_packet(AVCodecContext *avctx, void *data, int *got_frame_ptr,
s
->
packet_offset
=
get_bits_count
(
gb
)
&
7
;
return
(
s
->
packet_loss
)
?
AVERROR_INVALIDDATA
:
get_bits_count
(
gb
)
>>
3
;
return
(
s
->
packet_loss
)
?
AVERROR_INVALIDDATA
:
buf_size
?
get_bits_count
(
gb
)
>>
3
:
0
;
}
static
void
flush
(
AVCodecContext
*
avctx
)
...
...
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