[FFmpeg-cvslog] ituh263: reject b-frame with pp_time = 0

Keiji Costantini git at videolan.org
Sun Mar 2 01:53:58 CET 2014


ffmpeg | branch: master | Keiji Costantini <strites at gmail.com> | Sat Mar  1 18:17:04 2014 +0000| [9514440337875e0c63b409abcd616b68c518283f] | committer: Vittorio Giovara

ituh263: reject b-frame with pp_time = 0

Avoid a division by 0 in ff_mpeg4_set_one_direct_mv.

Sample-Id: 00000168-google
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind

Signed-off-by: Vittorio Giovara <vittorio.giovara at gmail.com>

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

 libavcodec/ituh263dec.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/ituh263dec.c b/libavcodec/ituh263dec.c
index e365210..98c8cfc 100644
--- a/libavcodec/ituh263dec.c
+++ b/libavcodec/ituh263dec.c
@@ -750,6 +750,8 @@ int ff_h263_decode_mb(MpegEncContext *s,
         }
 
         if(IS_DIRECT(mb_type)){
+            if (!s->pp_time)
+                return AVERROR_INVALIDDATA;
             s->mv_dir = MV_DIR_FORWARD | MV_DIR_BACKWARD | MV_DIRECT;
             mb_type |= ff_mpeg4_set_direct_mv(s, 0, 0);
         }else{



More information about the ffmpeg-cvslog mailing list