av_*_next() API for libavcodec

Originally committed as revision 11204 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Michael Niedermayer
2007-12-12 18:40:11 +00:00
parent 8540e8c3ec
commit 55b9e69a31
5 changed files with 28 additions and 7 deletions

View File

@@ -3321,8 +3321,8 @@ static void opt_show_formats(void)
AVInputFormat *ifmt;
AVOutputFormat *ofmt;
URLProtocol *up;
AVCodec *p, *p2;
AVBitStreamFilter *bsf;
AVCodec *p=NULL, *p2;
AVBitStreamFilter *bsf=NULL;
const char *last_name;
printf("File formats:\n");
@@ -3373,7 +3373,7 @@ static void opt_show_formats(void)
const char *type_str;
p2=NULL;
for(p = first_avcodec; p != NULL; p = p->next) {
while(p= av_codec_next(p)) {
if((p2==NULL || strcmp(p->name, p2->name)<0) &&
strcmp(p->name, last_name)>0){
p2= p;
@@ -3419,7 +3419,7 @@ static void opt_show_formats(void)
printf("\n");
printf("Bitstream filters:\n");
for(bsf = first_bitstream_filter; bsf != NULL; bsf = bsf->next)
while(bsf = av_bitstream_filter_next(bsf))
printf(" %s", bsf->name);
printf("\n");