[FFmpeg-devel] [PATCH] better reporting of programs

Nico Sabbi nicola_sabbi
Sun Oct 21 21:20:02 CEST 2007


Il Saturday 20 October 2007 21:00:47 Reimar D?ffinger ha scritto:
> Hello,
>
> On Sat, Oct 20, 2007 at 08:27:45PM +0200, Michael Niedermayer wrote:
> > On Wed, Oct 17, 2007 at 11:52:54PM +0200, Nico Sabbi wrote:
> > > +                        AVFormatContext *ic = input_files[z];
> > > +                        for(p=0; !found, p<ic->nb_programs;
> > > p++) { +                            AVProgram *program =
> > > ic->programs[p]; +                            if(program->id ==
> > > opt_programid) { +                                for(q=0;
> > > !found, q<program->nb_stream_indexes; q++) { +                 
> > >                   int sidx = program->stream_index[q]; +       
> > >                            
> > > if(ic->streams[sidx]->codec->codec_type ==
> > > ost->st->codec->codec_type) { +                                
> > >        ost->source_index = file_table[z].ist_index + sidx; +   
> > >                                     found = 1;
> > > +                                        break;
> >
> > this is a classic case where goto should be used or it should be
> > a seperate function which uses return
>
> Given the indentation level I'd say an additional function wouldn't
> hurt...

updated
-------------- next part --------------
A non-text attachment was scrubbed...
Name: f5.diff
Type: text/x-diff
Size: 3110 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20071021/5c7cc3b1/attachment.diff>



More information about the ffmpeg-devel mailing list