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
381e195b
Commit
381e195b
authored
Sep 27, 2011
by
Justin Ruggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pcmdec: move DVD PCM bits_per_coded_sample check near to the code that sets
the sample size.
parent
6b94711f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
pcm.c
libavcodec/pcm.c
+7
-5
No files found.
libavcodec/pcm.c
View file @
381e195b
...
@@ -279,10 +279,15 @@ static int pcm_decode_frame(AVCodecContext *avctx,
...
@@ -279,10 +279,15 @@ static int pcm_decode_frame(AVCodecContext *avctx,
sample_size
=
av_get_bits_per_sample
(
avctx
->
codec_id
)
/
8
;
sample_size
=
av_get_bits_per_sample
(
avctx
->
codec_id
)
/
8
;
/* av_get_bits_per_sample returns 0 for CODEC_ID_PCM_DVD */
/* av_get_bits_per_sample returns 0 for CODEC_ID_PCM_DVD */
if
(
CODEC_ID_PCM_DVD
==
avctx
->
codec_id
)
if
(
CODEC_ID_PCM_DVD
==
avctx
->
codec_id
)
{
if
(
avctx
->
bits_per_coded_sample
!=
20
&&
avctx
->
bits_per_coded_sample
!=
24
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"PCM DVD unsupported sample depth
\n
"
);
return
AVERROR
(
EINVAL
);
}
/* 2 samples are interleaved per block in PCM_DVD */
/* 2 samples are interleaved per block in PCM_DVD */
sample_size
=
avctx
->
bits_per_coded_sample
*
2
/
8
;
sample_size
=
avctx
->
bits_per_coded_sample
*
2
/
8
;
else
if
(
avctx
->
codec_id
==
CODEC_ID_PCM_LXF
)
}
else
if
(
avctx
->
codec_id
==
CODEC_ID_PCM_LXF
)
/* we process 40-bit blocks per channel for LXF */
/* we process 40-bit blocks per channel for LXF */
sample_size
=
5
;
sample_size
=
5
;
...
@@ -433,9 +438,6 @@ static int pcm_decode_frame(AVCodecContext *avctx,
...
@@ -433,9 +438,6 @@ static int pcm_decode_frame(AVCodecContext *avctx,
src
=
src8
;
src
=
src8
;
}
}
break
;
break
;
default:
av_log
(
avctx
,
AV_LOG_ERROR
,
"PCM DVD unsupported sample depth
\n
"
);
return
-
1
;
}
}
samples
=
(
uint8_t
*
)
dst_int32_t
;
samples
=
(
uint8_t
*
)
dst_int32_t
;
break
;
break
;
...
...
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