]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/4xm.c
aacsbr: Make the previous value of bs_num_env local to read_sbr_data().
[ffmpeg] / libavcodec / 4xm.c
index 8f6ec3a00e70f0d4e64b6da9deb7fe097b34b230..92ff9f6d7aed81609c6226ba3b3ca267b2ca6f87 100644 (file)
@@ -27,7 +27,7 @@
 #include "libavutil/intreadwrite.h"
 #include "avcodec.h"
 #include "dsputil.h"
-#include "bitstream.h"
+#include "get_bits.h"
 #include "bytestream.h"
 
 //#undef NDEBUG
@@ -137,7 +137,7 @@ typedef struct FourXContext{
     int mv[256];
     VLC pre_vlc;
     int last_dc;
-    DECLARE_ALIGNED_8(DCTELEM, block[6][64]);
+    DECLARE_ALIGNED(16, DCTELEM, block)[6][64];
     void *bitstream_buffer;
     unsigned int bitstream_buffer_size;
     int version;
@@ -815,7 +815,7 @@ static av_cold int decode_init(AVCodecContext *avctx){
     init_vlcs(f);
 
     if(f->version>2) avctx->pix_fmt= PIX_FMT_RGB565;
-    else             avctx->pix_fmt= PIX_FMT_RGB555;
+    else             avctx->pix_fmt= PIX_FMT_BGR555;
 
     return 0;
 }
@@ -832,6 +832,10 @@ static av_cold int decode_end(AVCodecContext *avctx){
         f->cfrm[i].allocated_size= 0;
     }
     free_vlc(&f->pre_vlc);
+    if(f->current_picture.data[0])
+        avctx->release_buffer(avctx, &f->current_picture);
+    if(f->last_picture.data[0])
+        avctx->release_buffer(avctx, &f->last_picture);
 
     return 0;
 }
@@ -845,7 +849,7 @@ AVCodec fourxm_decoder = {
     NULL,
     decode_end,
     decode_frame,
-    /*CODEC_CAP_DR1,*/
+    CODEC_CAP_DR1,
     .long_name = NULL_IF_CONFIG_SMALL("4X Movie"),
 };