Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
c141073f
Commit
c141073f
authored
Sep 03, 2009
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec: use AV_VERSION_INT.
parent
09ec87b0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
modules/codec/avcodec/audio.c
modules/codec/avcodec/audio.c
+2
-2
modules/codec/avcodec/encoder.c
modules/codec/avcodec/encoder.c
+4
-4
modules/codec/avcodec/video.c
modules/codec/avcodec/video.c
+1
-1
No files found.
modules/codec/avcodec/audio.c
View file @
c141073f
...
@@ -108,7 +108,7 @@ int InitAudioDec( decoder_t *p_dec, AVCodecContext *p_context,
...
@@ -108,7 +108,7 @@ int InitAudioDec( decoder_t *p_dec, AVCodecContext *p_context,
p_sys
->
p_context
->
block_align
=
p_dec
->
fmt_in
.
audio
.
i_blockalign
;
p_sys
->
p_context
->
block_align
=
p_dec
->
fmt_in
.
audio
.
i_blockalign
;
p_sys
->
p_context
->
bit_rate
=
p_dec
->
fmt_in
.
i_bitrate
;
p_sys
->
p_context
->
bit_rate
=
p_dec
->
fmt_in
.
i_bitrate
;
#if LIBAVCODEC_VERSION_INT <
((52<<16)+(0<<8)+0
)
#if LIBAVCODEC_VERSION_INT <
AV_VERSION_INT( 52, 0, 0
)
p_sys
->
p_context
->
bits_per_sample
=
p_dec
->
fmt_in
.
audio
.
i_bitspersample
;
p_sys
->
p_context
->
bits_per_sample
=
p_dec
->
fmt_in
.
audio
.
i_bitspersample
;
#else
#else
p_sys
->
p_context
->
bits_per_coded_sample
=
p_dec
->
fmt_in
.
audio
.
i_bitspersample
;
p_sys
->
p_context
->
bits_per_coded_sample
=
p_dec
->
fmt_in
.
audio
.
i_bitspersample
;
...
@@ -315,7 +315,7 @@ aout_buffer_t * DecodeAudio ( decoder_t *p_dec, block_t **pp_block )
...
@@ -315,7 +315,7 @@ aout_buffer_t * DecodeAudio ( decoder_t *p_dec, block_t **pp_block )
p_block
->
i_buffer
-=
FF_INPUT_BUFFER_PADDING_SIZE
;
p_block
->
i_buffer
-=
FF_INPUT_BUFFER_PADDING_SIZE
;
memset
(
&
p_block
->
p_buffer
[
p_block
->
i_buffer
],
0
,
FF_INPUT_BUFFER_PADDING_SIZE
);
memset
(
&
p_block
->
p_buffer
[
p_block
->
i_buffer
],
0
,
FF_INPUT_BUFFER_PADDING_SIZE
);
#if LIBAVCODEC_VERSION_INT >=
((52<<16)+(0<<8)+0
)
#if LIBAVCODEC_VERSION_INT >=
AV_VERSION_INT( 52, 0, 0
)
i_used
=
avcodec_decode_audio2
(
p_sys
->
p_context
,
i_used
=
avcodec_decode_audio2
(
p_sys
->
p_context
,
(
int16_t
*
)
p_sys
->
p_output
,
&
i_output
,
(
int16_t
*
)
p_sys
->
p_output
,
&
i_output
,
p_block
->
p_buffer
,
p_block
->
i_buffer
);
p_block
->
p_buffer
,
p_block
->
i_buffer
);
...
...
modules/codec/avcodec/encoder.c
View file @
c141073f
...
@@ -515,7 +515,7 @@ int OpenEncoder( vlc_object_t *p_this )
...
@@ -515,7 +515,7 @@ int OpenEncoder( vlc_object_t *p_this )
}
}
}
}
#if LIBAVCODEC_VERSION_INT <
((52<<16)+(0<<8)+0
)
#if LIBAVCODEC_VERSION_INT <
AV_VERSION_INT( 52, 0, 0
)
if
(
p_sys
->
b_trellis
)
if
(
p_sys
->
b_trellis
)
p_context
->
flags
|=
CODEC_FLAG_TRELLIS_QUANT
;
p_context
->
flags
|=
CODEC_FLAG_TRELLIS_QUANT
;
#else
#else
...
@@ -875,7 +875,7 @@ static block_t *EncodeVideo( encoder_t *p_enc, picture_t *p_pict )
...
@@ -875,7 +875,7 @@ static block_t *EncodeVideo( encoder_t *p_enc, picture_t *p_pict )
if
(
current_date
+
HURRY_UP_GUARD3
>
frame
.
pts
)
if
(
current_date
+
HURRY_UP_GUARD3
>
frame
.
pts
)
{
{
p_sys
->
p_context
->
mb_decision
=
FF_MB_DECISION_SIMPLE
;
p_sys
->
p_context
->
mb_decision
=
FF_MB_DECISION_SIMPLE
;
#if LIBAVCODEC_VERSION_INT <
((52<<16)+(0<<8)+0
)
#if LIBAVCODEC_VERSION_INT <
AV_VERSION_INT( 52, 0, 0
)
p_sys
->
p_context
->
flags
&=
~
CODEC_FLAG_TRELLIS_QUANT
;
p_sys
->
p_context
->
flags
&=
~
CODEC_FLAG_TRELLIS_QUANT
;
#else
#else
p_sys
->
p_context
->
trellis
=
0
;
p_sys
->
p_context
->
trellis
=
0
;
...
@@ -888,7 +888,7 @@ static block_t *EncodeVideo( encoder_t *p_enc, picture_t *p_pict )
...
@@ -888,7 +888,7 @@ static block_t *EncodeVideo( encoder_t *p_enc, picture_t *p_pict )
if
(
current_date
+
HURRY_UP_GUARD2
>
frame
.
pts
)
if
(
current_date
+
HURRY_UP_GUARD2
>
frame
.
pts
)
{
{
#if LIBAVCODEC_VERSION_INT <
((52<<16)+(0<<8)+0
)
#if LIBAVCODEC_VERSION_INT <
AV_VERSION_INT( 52, 0, 0
)
p_sys
->
p_context
->
flags
&=
~
CODEC_FLAG_TRELLIS_QUANT
;
p_sys
->
p_context
->
flags
&=
~
CODEC_FLAG_TRELLIS_QUANT
;
#else
#else
p_sys
->
p_context
->
trellis
=
0
;
p_sys
->
p_context
->
trellis
=
0
;
...
@@ -899,7 +899,7 @@ static block_t *EncodeVideo( encoder_t *p_enc, picture_t *p_pict )
...
@@ -899,7 +899,7 @@ static block_t *EncodeVideo( encoder_t *p_enc, picture_t *p_pict )
}
}
else
else
{
{
#if LIBAVCODEC_VERSION_INT <
((52<<16)+(0<<8)+0
)
#if LIBAVCODEC_VERSION_INT <
AV_VERSION_INT( 52, 0, 0
)
if
(
p_sys
->
b_trellis
)
if
(
p_sys
->
b_trellis
)
p_sys
->
p_context
->
flags
|=
CODEC_FLAG_TRELLIS_QUANT
;
p_sys
->
p_context
->
flags
|=
CODEC_FLAG_TRELLIS_QUANT
;
#else
#else
...
...
modules/codec/avcodec/video.c
View file @
c141073f
...
@@ -210,7 +210,7 @@ int InitVideoDec( decoder_t *p_dec, AVCodecContext *p_context,
...
@@ -210,7 +210,7 @@ int InitVideoDec( decoder_t *p_dec, AVCodecContext *p_context,
/* ***** Get configuration of ffmpeg plugin ***** */
/* ***** Get configuration of ffmpeg plugin ***** */
p_sys
->
p_context
->
workaround_bugs
=
p_sys
->
p_context
->
workaround_bugs
=
config_GetInt
(
p_dec
,
"ffmpeg-workaround-bugs"
);
config_GetInt
(
p_dec
,
"ffmpeg-workaround-bugs"
);
#if LIBAVCODEC_VERSION_INT <
((52<<16)+(0<<8)+0
)
#if LIBAVCODEC_VERSION_INT <
AV_VERSION_INT( 52, 0, 0
)
p_sys
->
p_context
->
error_resilience
=
p_sys
->
p_context
->
error_resilience
=
config_GetInt
(
p_dec
,
"ffmpeg-error-resilience"
);
config_GetInt
(
p_dec
,
"ffmpeg-error-resilience"
);
#else
#else
...
...
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