diff --git a/libavcodec/dv.c b/libavcodec/dv.c
index d454e61e6770e0b70ee2838965802b45a96263c3..75fd26eea912890067ac195700c259a6c4e58f67 100644
--- a/libavcodec/dv.c
+++ b/libavcodec/dv.c
@@ -628,8 +628,6 @@ static int dvvideo_decode_frame(AVCodecContext *avctx,
 
 static int dvvideo_decode_end(AVCodecContext *avctx)
 {
-    DVVideoDecodeContext *s = avctx->priv_data;
-
     avcodec_default_free_buffers(avctx);    
 
     return 0;
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index f9d994509ab80ce054c73cdd20046cb5ae78d5c5..364d0ace73299d985e621da1ed3df7a1d104cd82 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -1426,7 +1426,6 @@ static int load_input_picture(MpegEncContext *s, AVFrame *pic_arg){
 
 static void select_input_picture(MpegEncContext *s){
     int i;
-    const int encoding_delay= s->max_b_frames;
     int coded_pic_num=0;    
 
     if(s->reordered_input_picture[0])
@@ -2725,7 +2724,6 @@ static int pix_diff_vcmp16x8(uint8_t *s1, uint8_t*s2, int stride){ //FIXME move
 void ff_draw_horiz_band(MpegEncContext *s, int y, int h){
     if (s->avctx->draw_horiz_band) {
         AVFrame *src;
-        uint8_t *src_ptr[3];
         int offset[4];
         
         if(s->picture_structure != PICT_FRAME){