[FFmpeg-devel] Fix FFM-based audio streaming from FFmpeg to FFserver

Baptiste Coudurier baptiste.coudurier
Wed Mar 31 22:06:32 CEST 2010


On 03/30/2010 11:24 AM, Ronald S. Bultje wrote:
> Hi,
>
> On Mon, Mar 29, 2010 at 7:35 PM, Michael Niedermayer<michaelni at gmx.at>  wrote:
>> On Sun, Mar 28, 2010 at 09:55:13PM -0400, Ronald S. Bultje wrote:
>>> Ping. Should I send a patch for the avcodec_copy_context() function
>>> separately to make this easier to review?
>>
>> i think a split might help, yes
>
> OK, see other threads, last parts applied here.
>
> Ronald
>
>
> fix-ffserver-ffm-streaming.patch
>
>
> Index: ffmpeg-svn/ffserver.c
> ===================================================================
> --- ffmpeg-svn.orig/ffserver.c	2010-03-30 14:18:24.000000000 -0400
> +++ ffmpeg-svn/ffserver.c	2010-03-30 14:20:15.000000000 -0400
> @@ -4039,7 +4039,6 @@
>                           filename, line_num);
>               } else {
>                   FFStream *s;
> -                const AVClass *class;
>                   stream = av_mallocz(sizeof(FFStream));
>                   get_arg(stream->filename, sizeof(stream->filename),&p);
>                   q = strrchr(stream->filename, '>');
> @@ -4055,15 +4054,8 @@
>                   }
>
>                   stream->fmt = ffserver_guess_format(NULL, stream->filename, NULL);
> -                /* fetch avclass so AVOption works
> -                 * FIXME try to use avcodec_get_context_defaults2
> -                 * without changing defaults too much */
> -                avcodec_get_context_defaults(&video_enc);
> -                class = video_enc.av_class;
> -                memset(&audio_enc, 0, sizeof(AVCodecContext));
> -                memset(&video_enc, 0, sizeof(AVCodecContext));
> -                audio_enc.av_class = class;
> -                video_enc.av_class = class;
> +                avcodec_get_context_defaults2(&video_enc, CODEC_TYPE_VIDEO);
> +                avcodec_get_context_defaults2(&audio_enc, CODEC_TYPE_AUDIO);
>                   audio_id = CODEC_ID_NONE;
>                   video_id = CODEC_ID_NONE;

Ok.

-- 
Baptiste COUDURIER
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
FFmpeg maintainer                                  http://www.ffmpeg.org



More information about the ffmpeg-devel mailing list