Ticket #1923: vble.diff

File vble.diff, 908 bytes (added by ami_stuff, 4 years ago)
  • libavcodec/vble.c

    diff --git a/libavcodec/vble.c b/libavcodec/vble.c
    index 07efad8..603b319 100644
    a b static int vble_decode_frame(AVCodecContext *avctx, void *data, int *data_size, 
    117117    AVFrame *pic = avctx->coded_frame; 
    118118    GetBitContext gb; 
    119119    const uint8_t *src = avpkt->data; 
    120     int version; 
    121120    int offset = 0; 
    122121    int width_uv = avctx->width / 2, height_uv = avctx->height / 2; 
    123122 
    static int vble_decode_frame(AVCodecContext *avctx, void *data, int *data_size, 
    137136    pic->key_frame = 1; 
    138137    pic->pict_type = AV_PICTURE_TYPE_I; 
    139138 
    140     /* Version should always be 1 */ 
    141     version = AV_RL32(src); 
    142  
    143     if (version != 1) { 
    144         av_log(avctx, AV_LOG_ERROR, "Unsupported VBLE Version: %d\n", version); 
    145         return AVERROR_INVALIDDATA; 
    146     } 
    147  
    148139    init_get_bits(&gb, src + 4, (avpkt->size - 4) * 8); 
    149140 
    150141    /* Unpack */