Module: libav
Branch: release/12
Commit: 49cf72b3ac77140cf4715c18fe7c7610d918d912

Author:    Michael Niedermayer <michae...@gmx.at>
Committer: Sean McGovern <gsean...@gmail.com>
Date:      Sat Dec 14 17:11:21 2013 +0100

avcodec/vc1dec: fix mby_start for interlaced content

Bug-Id: 1100
Bug-Id: ffmpeg/Ticket2531
Cc: libav-sta...@libav.org
(cherry picked from commit 5b6213ef6bf5e0781c83e86926eb0b33a98dc185)
Signed-off-by: Sean McGovern <gsean...@gmail.com>

---

 libavcodec/vc1dec.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index 1955cea..0f53ff8 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -651,7 +651,7 @@ static int vc1_decode_frame(AVCodecContext *avctx, void 
*data,
                                   buf_size3 << 3);
                     /* assuming that the field marker is at the exact middle,
                        hope it's correct */
-                    slices[n_slices].mby_start = s->mb_height >> 1;
+                    slices[n_slices].mby_start = s->mb_height + 1 >> 1;
                     n_slices1 = n_slices - 1; // index of the last slice of 
the first field
                     n_slices++;
                     break;
@@ -699,7 +699,7 @@ static int vc1_decode_frame(AVCodecContext *avctx, void 
*data,
                 buf_size3 = vc1_unescape_buffer(divider + 4, buf + buf_size - 
divider - 4, slices[n_slices].buf);
                 init_get_bits(&slices[n_slices].gb, slices[n_slices].buf,
                               buf_size3 << 3);
-                slices[n_slices].mby_start = s->mb_height >> 1;
+                slices[n_slices].mby_start = s->mb_height + 1 >> 1;
                 n_slices1 = n_slices - 1;
                 n_slices++;
             }

_______________________________________________
libav-commits mailing list
libav-commits@libav.org
https://lists.libav.org/mailman/listinfo/libav-commits

Reply via email to