[FFmpeg-devel] [PATCH] av_find_best_stream

Stefano Sabatini stefano.sabatini-lala
Tue Dec 21 23:22:30 CET 2010


On date Tuesday 2010-12-21 19:46:03 +0100, Nicolas George encoded:
> Thanks for the review.
> 
> Le primidi 1er niv?se, an CCXIX, Stefano Sabatini a ?crit?:
> > Nit: missing empty line before @param;
> 
> Fixed.
> 
> >					 also I suggest fmtctx or avctx
> 
> On principle, I agree, but most surrounding functions use ic or s:
> consistency seems more important.
> 
> > and no need for the ending point (no complete sentence)
> 
> Removed.
> 
> > -1 for enabling automatic selection I suppose
> 
> Clarified.
> 
> > I'd put this into the main description, since this affects the
> > function behavior.
> 
> Rephrased.
> 
> > defied -> defined, also skip the trailing dot
> 
> Fixed.
> 
> Here is the updated version.
> 
> Also, correct me if I am wrong, it requires a bump of lavf minor.

Yes of course.

[...]
> --- a/libavformat/avformat.h
> +++ b/libavformat/avformat.h
> @@ -1140,6 +1140,30 @@ AVFormatContext *avformat_alloc_context(void);
>  int av_find_stream_info(AVFormatContext *ic);
>  
>  /**
> + * Find the "best" stream in the file.
> + * The best stream is determined according to various heuristics as the most
> + * likely to be what the user expects.
> + * @param ic       media file handle.
> + * @param type     stream type: video, audio, subtitles, etc.
> + * @param user     user-requested stream number, or -1.
> + * @param decoder  if not NULL, returns the default decoder for the stream's
> + *                 codec; streams for which no decoder can be found are
> + *                 ignored.
> + * @param flags    flags; none are currently defied.
> + * @return  the non-negative stream number in case of success,
> + *          AVERROR_STREAM_NOT_FOUND if no stream with the requested type
> + *          could be found,
> + *          AVERROR_DECODER_NOT_FOUND if streams were found but no decoder.
> + * @note  If av_find_best_stream returns successfully and codec is not NULL,
> + *        then *codec is guaranteed to be set to a valid AVCodec.

Uhm I believe you posted the old patch.
-- 
FFmpeg = Frenzy Fascinating MultiPurpose Egregious Guru



More information about the ffmpeg-devel mailing list