[FFmpeg-cvslog] mpeg4videodec: Fix new slice end detection for missing slices.

Michael Niedermayer git at videolan.org
Sun Sep 11 17:41:48 CEST 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Sep 11 17:35:42 2011 +0200| [fe0ac337bd6b4783162bc55eb62f82181d498d5e] | committer: Michael Niedermayer

mpeg4videodec: Fix new slice end detection for missing slices.

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fe0ac337bd6b4783162bc55eb62f82181d498d5e
---

 libavcodec/mpeg4videodec.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c
index 759109f..9d8e193 100644
--- a/libavcodec/mpeg4videodec.c
+++ b/libavcodec/mpeg4videodec.c
@@ -1489,6 +1489,16 @@ end:
                 return -1;
             } else if (s->mb_x + s->mb_y*s->mb_width + 1 >= next)
                 return SLICE_END;
+
+            if(s->pict_type==AV_PICTURE_TYPE_B){
+                const int delta= s->mb_x + 1 == s->mb_width ? 2 : 1;
+                ff_thread_await_progress((AVFrame*)s->next_picture_ptr,
+                                        (s->mb_x + delta >= s->mb_width) ? FFMIN(s->mb_y+1, s->mb_height-1) : s->mb_y, 0);
+                if (s->next_picture.f.mbskip_table[xy + delta])
+                    return SLICE_OK;
+            }
+
+            return SLICE_END;
         }
     }
 



More information about the ffmpeg-cvslog mailing list