Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
e0aa5e77
Commit
e0aa5e77
authored
12 years ago
by
Anton Khirnov
Browse files
Options
Downloads
Patches
Plain Diff
dvenc: don't use deprecated AVCODEC_MAX_AUDIO_FRAME_SIZE
parent
8337b5db
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libavformat/dvenc.c
+4
-2
4 additions, 2 deletions
libavformat/dvenc.c
with
4 additions
and
2 deletions
libavformat/dvenc.c
+
4
−
2
View file @
e0aa5e77
...
@@ -38,6 +38,8 @@
...
@@ -38,6 +38,8 @@
#include
"libavutil/fifo.h"
#include
"libavutil/fifo.h"
#include
"libavutil/mathematics.h"
#include
"libavutil/mathematics.h"
#define MAX_AUDIO_FRAME_SIZE 192000 // 1 second of 48khz 32bit audio
struct
DVMuxContext
{
struct
DVMuxContext
{
const
DVprofile
*
sys
;
/* current DV profile, e.g.: 525/60, 625/50 */
const
DVprofile
*
sys
;
/* current DV profile, e.g.: 525/60, 625/50 */
int
n_ast
;
/* number of stereo audio streams (up to 2) */
int
n_ast
;
/* number of stereo audio streams (up to 2) */
...
@@ -255,7 +257,7 @@ static int dv_assemble_frame(DVMuxContext *c, AVStream* st,
...
@@ -255,7 +257,7 @@ static int dv_assemble_frame(DVMuxContext *c, AVStream* st,
for
(
i
=
0
;
i
<
c
->
n_ast
&&
st
!=
c
->
ast
[
i
];
i
++
);
for
(
i
=
0
;
i
<
c
->
n_ast
&&
st
!=
c
->
ast
[
i
];
i
++
);
/* FIXME: we have to have more sensible approach than this one */
/* FIXME: we have to have more sensible approach than this one */
if
(
av_fifo_size
(
c
->
audio_data
[
i
])
+
data_size
>=
100
*
AVCODEC_
MAX_AUDIO_FRAME_SIZE
)
if
(
av_fifo_size
(
c
->
audio_data
[
i
])
+
data_size
>=
100
*
MAX_AUDIO_FRAME_SIZE
)
av_log
(
st
->
codec
,
AV_LOG_ERROR
,
"Can't process DV frame #%d. Insufficient video data or severe sync problem.
\n
"
,
c
->
frames
);
av_log
(
st
->
codec
,
AV_LOG_ERROR
,
"Can't process DV frame #%d. Insufficient video data or severe sync problem.
\n
"
,
c
->
frames
);
av_fifo_generic_write
(
c
->
audio_data
[
i
],
data
,
data_size
,
NULL
);
av_fifo_generic_write
(
c
->
audio_data
[
i
],
data
,
data_size
,
NULL
);
...
@@ -343,7 +345,7 @@ static DVMuxContext* dv_init_mux(AVFormatContext* s)
...
@@ -343,7 +345,7 @@ static DVMuxContext* dv_init_mux(AVFormatContext* s)
c
->
start_time
=
ff_iso8601_to_unix_time
(
t
->
value
);
c
->
start_time
=
ff_iso8601_to_unix_time
(
t
->
value
);
for
(
i
=
0
;
i
<
c
->
n_ast
;
i
++
)
{
for
(
i
=
0
;
i
<
c
->
n_ast
;
i
++
)
{
if
(
c
->
ast
[
i
]
&&
!
(
c
->
audio_data
[
i
]
=
av_fifo_alloc
(
100
*
AVCODEC_
MAX_AUDIO_FRAME_SIZE
)))
{
if
(
c
->
ast
[
i
]
&&
!
(
c
->
audio_data
[
i
]
=
av_fifo_alloc
(
100
*
MAX_AUDIO_FRAME_SIZE
)))
{
while
(
i
>
0
)
{
while
(
i
>
0
)
{
i
--
;
i
--
;
av_fifo_free
(
c
->
audio_data
[
i
]);
av_fifo_free
(
c
->
audio_data
[
i
]);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment