[FFmpeg-devel] [BUG] Theora decoder displays green line

Aurelien Jacobs aurel
Sun May 6 18:58:09 CEST 2007


On Sun, 06 May 2007 18:01:23 +0200
matthieu castet <castet.matthieu at free.fr> wrote:

> Aurelien Jacobs wrote:
> > On Sun, 6 May 2007 17:12:21 +0200
> > Michael Niedermayer <michaelni at gmx.at> wrote:
> > 
> >> Hi
> >>
> >> On Sun, May 06, 2007 at 02:26:36PM +0200, Diego Biurrun wrote:
> >>> Try the following sample:
> >>>
> >>> http://mirrors.creativecommons.org/getcreative/Creative_Commons_-_Get_Creative.ogg
> >>>
> >>> ffplay displays a green line at the bottom (as does MPlayer with lavc
> >>> decoder and lavf demuxer), while MPlayer with native demuxer and
> >>> libtheora decoder works fine.
> >> ffmpeg -i output could be usefull
> > 
> > coded size is 400x304, display size should be 400x300.
> > Attached patch fixes this issue.
> Index: libavcodec/vp3.c
> 
>       s->width = get_bits(gb, 16) << 4;
>       s->height = get_bits(gb, 16) << 4;
> +    avctx->width = get_bits_long(gb, 24);
> +    avctx->height = get_bits_long(gb, 24);
> 
>       if(avcodec_check_dimensions(avctx, s->width, s->height)){
>           av_log(avctx, AV_LOG_ERROR, "Invalid dimensions (%dx%d)\n", 
> s->width, s->height);
> @@ -2399,15 +2401,7 @@
>           skip_bits(gb, 32); /* total number of blocks in a frame */
>           skip_bits(gb, 4); /* total number of blocks in a frame */
>           skip_bits(gb, 32); /* total number of macroblocks in a frame */
> -
> -        skip_bits(gb, 24); /* frame width */
> -        skip_bits(gb, 24); /* frame height */
>       }
> -    else
> -    {
> -        skip_bits(gb, 24); /* frame width */
> -        skip_bits(gb, 24); /* frame height */
> -    }
> Are you sure of that ?
> The code this wrong for (s->theora >= 0x030400) as frame dimension where 
> expected after the 3 "total number of x"

I had a look a libtheora and at theora specs and they both says that
on version 3.2 exists. I havn't seen anything about version 3.4.
Any informations available somewhere ?
Anyway, I will suppose the order of skip_bits() is right for v3.4
and will respect this in the next occurance of this patch.
Thanks.

Aurel




More information about the ffmpeg-devel mailing list