[FFmpeg-cvslog] r18398 - trunk/libavcodec/snow.c

michael subversion
Thu Apr 9 23:17:54 CEST 2009


Author: michael
Date: Thu Apr  9 23:17:53 2009
New Revision: 18398

Log:
Move release_buffer() up so it is prior to a future call to it.

Modified:
   trunk/libavcodec/snow.c

Modified: trunk/libavcodec/snow.c
==============================================================================
--- trunk/libavcodec/snow.c	Thu Apr  9 22:44:18 2009	(r18397)
+++ trunk/libavcodec/snow.c	Thu Apr  9 23:17:53 2009	(r18398)
@@ -4123,6 +4123,18 @@ static void halfpel_interpol(SnowContext
     }
 }
 
+static void release_buffer(AVCodecContext *avctx){
+    SnowContext *s = avctx->priv_data;
+    int i;
+
+    if(s->last_picture[s->max_ref_frames-1].data[0]){
+        avctx->release_buffer(avctx, &s->last_picture[s->max_ref_frames-1]);
+        for(i=0; i<9; i++)
+            if(s->halfpel_plane[s->max_ref_frames-1][1+i/3][i%3])
+                av_free(s->halfpel_plane[s->max_ref_frames-1][1+i/3][i%3] - EDGE_WIDTH*(1+s->current_picture.linesize[i%3]));
+    }
+}
+
 static int frame_start(SnowContext *s){
    AVFrame tmp;
    int w= s->avctx->width; //FIXME round up to x16 ?
@@ -4167,18 +4179,6 @@ static int frame_start(SnowContext *s){
     return 0;
 }
 
-static void release_buffer(AVCodecContext *avctx){
-    SnowContext *s = avctx->priv_data;
-    int i;
-
-    if(s->last_picture[s->max_ref_frames-1].data[0]){
-        avctx->release_buffer(avctx, &s->last_picture[s->max_ref_frames-1]);
-        for(i=0; i<9; i++)
-            if(s->halfpel_plane[s->max_ref_frames-1][1+i/3][i%3])
-                av_free(s->halfpel_plane[s->max_ref_frames-1][1+i/3][i%3] - EDGE_WIDTH*(1+s->current_picture.linesize[i%3]));
-    }
-}
-
 static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data){
     SnowContext *s = avctx->priv_data;
     RangeCoder * const c= &s->c;



More information about the ffmpeg-cvslog mailing list