lavd/fbdev: pass proper memory map length
authorLukasz Marek <lukasz.m.luki@gmail.com>
Fri, 18 Oct 2013 18:45:13 +0000 (20:45 +0200)
committerStefano Sabatini <stefasab@gmail.com>
Fri, 18 Oct 2013 21:23:23 +0000 (23:23 +0200)
fbdev->data was allocated with size fbdev->fixinfo.smem_len, release data
in fbdev_read_close() using the same size.

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
libavdevice/fbdev.c

index 1156fb5..7edf10b 100644 (file)
@@ -231,7 +231,7 @@ static av_cold int fbdev_read_close(AVFormatContext *avctx)
 {
     FBDevContext *fbdev = avctx->priv_data;
 
-    munmap(fbdev->data, fbdev->frame_size);
+    munmap(fbdev->data, fbdev->fixinfo.smem_len);
     close(fbdev->fd);
 
     return 0;