changeset 4062:683d458a251f libavcodec

use the adjustment value present in FLV to crop VP6 video
author aurel
date Sun, 22 Oct 2006 23:19:42 +0000
parents e5d148036c87
children 7f991a9cd252
files vp6.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/vp6.c	Sun Oct 22 18:33:09 2006 +0000
+++ b/vp6.c	Sun Oct 22 23:19:42 2006 +0000
@@ -64,6 +64,10 @@
         if (16*cols != s->avctx->coded_width ||
             16*rows != s->avctx->coded_height) {
             avcodec_set_dimensions(s->avctx, 16*cols, 16*rows);
+            if (s->avctx->extradata_size == 1) {
+                s->avctx->width  -= s->avctx->extradata[0] >> 4;
+                s->avctx->height -= s->avctx->extradata[0] & 0x0F;
+            }
             res = 2;
         }