summaryrefslogtreecommitdiff
path: root/libavcodec/snow.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2009-04-09 21:17:53 +0000
committerMichael Niedermayer <michaelni@gmx.at>2009-04-09 21:17:53 +0000
commit38fd076c213057dedc1dc3f74b6ba1fc9c4c6ab3 (patch)
tree928bc0cff2728f3c553aebe5b552349e438b58cf /libavcodec/snow.c
parent0a08b5735be6995e8aa23113377064ba19156892 (diff)
downloadffmpeg-38fd076c213057dedc1dc3f74b6ba1fc9c4c6ab3.tar.gz
Move release_buffer() up so it is prior to a future call to it.
Originally committed as revision 18398 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/snow.c')
-rw-r--r--libavcodec/snow.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/libavcodec/snow.c b/libavcodec/snow.c
index cb04982cb3..b919ef306a 100644
--- a/libavcodec/snow.c
+++ b/libavcodec/snow.c
@@ -4123,6 +4123,18 @@ static void halfpel_interpol(SnowContext *s, uint8_t *halfpel[4][4], AVFrame *fr
}
}
+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;