Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
bd2e7b74
Commit
bd2e7b74
authored
Apr 14, 2020
by
Josh de Kock
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc: stop using deprecated av_codec_next()
Signed-off-by:
Josh de Kock
<
josh@itanimul.li
>
parent
4cde83c7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
options.c
libavcodec/options.c
+4
-3
utils.c
libavcodec/tests/utils.c
+3
-2
No files found.
libavcodec/options.c
View file @
bd2e7b74
...
@@ -55,15 +55,16 @@ static void *codec_child_next(void *obj, void *prev)
...
@@ -55,15 +55,16 @@ static void *codec_child_next(void *obj, void *prev)
static
const
AVClass
*
codec_child_class_next
(
const
AVClass
*
prev
)
static
const
AVClass
*
codec_child_class_next
(
const
AVClass
*
prev
)
{
{
AVCodec
*
c
=
NULL
;
void
*
iter
=
NULL
;
const
AVCodec
*
c
=
NULL
;
/* find the codec that corresponds to prev */
/* find the codec that corresponds to prev */
while
(
prev
&&
(
c
=
av_codec_
next
(
c
)))
while
(
prev
&&
(
c
=
av_codec_
iterate
(
&
iter
)))
if
(
c
->
priv_class
==
prev
)
if
(
c
->
priv_class
==
prev
)
break
;
break
;
/* find next codec with priv options */
/* find next codec with priv options */
while
(
c
=
av_codec_
next
(
c
))
while
(
c
=
av_codec_
iterate
(
&
iter
))
if
(
c
->
priv_class
)
if
(
c
->
priv_class
)
return
c
->
priv_class
;
return
c
->
priv_class
;
return
NULL
;
return
NULL
;
...
...
libavcodec/tests/utils.c
View file @
bd2e7b74
...
@@ -19,10 +19,11 @@
...
@@ -19,10 +19,11 @@
#include "libavcodec/avcodec.h"
#include "libavcodec/avcodec.h"
int
main
(
void
){
int
main
(
void
){
AVCodec
*
codec
=
NULL
;
void
*
iter
=
NULL
;
const
AVCodec
*
codec
=
NULL
;
int
ret
=
0
;
int
ret
=
0
;
while
(
codec
=
av_codec_
next
(
codec
))
{
while
(
codec
=
av_codec_
iterate
(
&
iter
))
{
if
(
av_codec_is_encoder
(
codec
))
{
if
(
av_codec_is_encoder
(
codec
))
{
if
(
codec
->
type
==
AVMEDIA_TYPE_AUDIO
)
{
if
(
codec
->
type
==
AVMEDIA_TYPE_AUDIO
)
{
if
(
!
codec
->
sample_fmts
)
{
if
(
!
codec
->
sample_fmts
)
{
...
...
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