[FFmpeg-devel] [PATCH 1/2] lavf/swfdec: factorize the creation of a new stream.

Clément Bœsch ubitux at gmail.com
Wed Feb 20 21:49:03 CET 2013


On Wed, Feb 20, 2013 at 09:44:44PM +0100, Clément Bœsch wrote:
> This also makes the changes of a3949fe11 applicable in both cases.
> ---
>  libavformat/swfdec.c | 51 +++++++++++++++++++++++++--------------------------
>  1 file changed, 25 insertions(+), 26 deletions(-)
> 
> diff --git a/libavformat/swfdec.c b/libavformat/swfdec.c
> index 8fb4aeb..192dbec 100644
> --- a/libavformat/swfdec.c
> +++ b/libavformat/swfdec.c
> @@ -138,6 +138,29 @@ static int swf_read_header(AVFormatContext *s)
>      return 0;
>  }
>  
> +static AVStream *create_new_audio_stream(AVFormatContext *s, int id, int info)
> +{
> +    int sample_rate_code;
> +    AVStream *ast = avformat_new_stream(s, NULL);
> +    if (!ast)
> +        return NULL;

> +    ast->id = id; /* -1 to avoid clash with video stream ch_id */

Comment discarded locally.

[...]

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130220/a23d4e18/attachment.asc>


More information about the ffmpeg-devel mailing list