[FFmpeg-devel] [PATCH] Rename find_program_from_stream to av_find_program_from_stream and make it public

Måns Rullgård mans
Sat Feb 19 18:02:58 CET 2011


Marton Balint <cus at passwd.hu> writes:

> Hi,
>
> The find_program_from_stream is a useful funcion that should not be
> static. For example, if you want to implement program switching in
> ffplay, it might come very handy...
>
> Regards,
>   Marton
>
> commit a4cce8c55fc159efd2d6f61b51c7650710e5d6ea
> Author: Marton Balint <cus at passwd.hu>
> Date:   Fri Feb 18 21:40:03 2011 +0100
>
>     Rename find_program_from_stream to av_find_program_from_stream and add it to avformat.h
> ---
>  libavformat/avformat.h |    9 +++++++++
>  libavformat/utils.c    |    4 ++--
>  2 files changed, 11 insertions(+), 2 deletions(-)
>
> diff --git a/libavformat/avformat.h b/libavformat/avformat.h
> index 63cac8f..644a36f 100644
> --- a/libavformat/avformat.h
> +++ b/libavformat/avformat.h
> @@ -1119,6 +1119,15 @@ AVFormatContext *avformat_alloc_context(void);
>  int av_find_stream_info(AVFormatContext *ic);
>
>  /**
> + * Find the program which belongs to a given stream.
> + *
> + * @param ic                media file handle
> + * @param s                 stream index
> + * @return  the program which belongs to s, NULL if no program is found.
> + */
> +AVProgram *av_find_program_from_stream(AVFormatContext *ic, int s);

A stream may belong to multiple programs.  What is the proper thing to
when that is the case?  We should decide on this before making the
function public.

-- 
M?ns Rullg?rd
mans at mansr.com



More information about the ffmpeg-devel mailing list