[FFmpeg-trac] #1858(undetermined:open): smackvideo: fail to decode

FFmpeg trac at avcodec.org
Sun Oct 28 19:17:39 CET 2012


#1858: smackvideo: fail to decode
-------------------------------------+-------------------------------------
             Reporter:  ami_stuff    |                    Owner:
                 Type:  defect       |                   Status:  open
             Priority:  normal       |                Component:
              Version:  git-master   |  undetermined
             Keywords:  smacker      |               Resolution:
             Blocking:               |               Blocked By:
Analyzed by developer:  0            |  Reproduced by developer:  1
-------------------------------------+-------------------------------------

Comment (by richardpl):

 This fixes decoding:

 {{{#!cpp
 diff --git a/libavcodec/smacker.c b/libavcodec/smacker.c
 index 472d0ef..b1e656a 100644
 --- a/libavcodec/smacker.c
 +++ b/libavcodec/smacker.c
 @@ -137,11 +137,9 @@ static int smacker_decode_bigtree(GetBitContext *gb,
 HuffContext *hc, DBCtx *ctx
          return -1;
      }
      if(!get_bits1(gb)){ //Leaf
 -        int val, i1, i2;
 +        unsigned int val, i1, i2;
          i1 = ctx->v1->table ? get_vlc2(gb, ctx->v1->table, SMKTREE_BITS,
 3) : 0;
          i2 = ctx->v2->table ? get_vlc2(gb, ctx->v2->table, SMKTREE_BITS,
 3) : 0;
 -        if (i1 < 0 || i2 < 0)
 -            return -1;
          val = ctx->recode1[i1] | (ctx->recode2[i2] << 8);
          if(val == ctx->escapes[0]) {
              ctx->last[0] = hc->current;
 }}}

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/1858#comment:2>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list