]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/ffv1.c
fix adpcm ima qt decoding, channel at init is 0, correct stereo out since samples...
[ffmpeg] / libavcodec / ffv1.c
index ee5419cd3f8a13865fd54caa46552664014a02ee..14e39ca4a2810e5beb2d5eec004cb740b7f435a5 100644 (file)
@@ -18,7 +18,6 @@
  * You should have received a copy of the GNU Lesser General Public
  * License along with FFmpeg; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
  */
 
 /**
@@ -531,7 +530,7 @@ static void write_header(FFV1Context *f){
 }
 #endif /* CONFIG_ENCODERS */
 
-static int common_init(AVCodecContext *avctx){
+static av_cold int common_init(AVCodecContext *avctx){
     FFV1Context *s = avctx->priv_data;
     int width, height;
 
@@ -549,7 +548,7 @@ static int common_init(AVCodecContext *avctx){
 }
 
 #ifdef CONFIG_ENCODERS
-static int encode_init(AVCodecContext *avctx)
+static av_cold int encode_init(AVCodecContext *avctx)
 {
     FFV1Context *s = avctx->priv_data;
     int i;
@@ -695,7 +694,7 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size,
 }
 #endif /* CONFIG_ENCODERS */
 
-static int common_end(AVCodecContext *avctx){
+static av_cold int common_end(AVCodecContext *avctx){
     FFV1Context *s = avctx->priv_data;
     int i;
 
@@ -703,6 +702,7 @@ static int common_end(AVCodecContext *avctx){
         PlaneContext *p= &s->plane[i];
 
         av_freep(&p->state);
+        av_freep(&p->vlc_state);
     }
 
     return 0;
@@ -927,7 +927,7 @@ static int read_header(FFV1Context *f){
     return 0;
 }
 
-static int decode_init(AVCodecContext *avctx)
+static av_cold int decode_init(AVCodecContext *avctx)
 {
 //    FFV1Context *s = avctx->priv_data;
 
@@ -936,7 +936,7 @@ static int decode_init(AVCodecContext *avctx)
     return 0;
 }
 
-static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, uint8_t *buf, int buf_size){
+static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, const uint8_t *buf, int buf_size){
     FFV1Context *f = avctx->priv_data;
     RangeCoder * const c= &f->c;
     const int width= f->width;