[FFmpeg-cvslog] oggdec: Leave treatment of serial changes to the decoder.

Geek.Song ffmpeg at gmail.com
Wed Jan 16 02:42:25 CET 2013


Why do not remove the below the first "return 0"?

    os = &ogg->streams[0];

    os->serial  = serial;
    return 0;

    buf     = os->buf;
    bufsize = os->bufsize;
    codec   = os->codec;

    if (!ogg->state || ogg->state->streams[0].private != os->private)
        av_freep(&ogg->streams[0].private);

    /* Set Ogg stream settings similar to what is done in ogg_new_stream().
We
     * also re-use the ogg_stream allocated buffer */
    memset(os, 0, sizeof(*os));
    os->serial  = serial;
    os->bufsize = bufsize;
    os->buf     = buf;
    os->header  = -1;
    os->codec   = codec;

    return 0;
}


On Wed, Jan 16, 2013 at 3:28 AM, Michael Niedermayer <git at videolan.org>wrote:

> ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun
> Jan 13 21:32:34 2013 +0100| [c994bb2fb7727f5c20ef71cc6727fb219fd49d60] |
> committer: Michael Niedermayer
>
> oggdec: Leave treatment of serial changes to the decoder.
>
> Attempting to re-parse the headers at demuxer level is a
> pandora box the way its done currently.
>
> This allows full reconfiguration of vorbis streams
>
> Fixes Ticket2117
> Fixes Ticket2121
>
> Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
>
> >
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c994bb2fb7727f5c20ef71cc6727fb219fd49d60
> ---
>
>  libavformat/oggdec.c |    3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c
> index eec4538..3e3be2f 100644
> --- a/libavformat/oggdec.c
> +++ b/libavformat/oggdec.c
> @@ -184,6 +184,9 @@ static int ogg_replace_stream(AVFormatContext *s,
> uint32_t serial)
>
>      os = &ogg->streams[0];
>
> +    os->serial  = serial;
> +    return 0;
> +
>      buf     = os->buf;
>      bufsize = os->bufsize;
>      codec   = os->codec;
>
> _______________________________________________
> ffmpeg-cvslog mailing list
> ffmpeg-cvslog at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
>



-- 
-----------------------------------------------------------------------------------------
My key fingerprint: d1:03:f5:32:26:ff:d7:3c:e4:42:e3:51:ec:92:78:b2


More information about the ffmpeg-cvslog mailing list