[FFmpeg-cvslog] avcodec/ituh263enc: Check den==0 in ff_h263_aspect_to_info()

Michael Niedermayer git at videolan.org
Mon Dec 29 16:07:39 CET 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Dec 29 15:51:36 2014 +0100| [db0a52d611d7319c8a1186829a50e29b9dfed63b] | committer: Michael Niedermayer

avcodec/ituh263enc: Check den==0 in ff_h263_aspect_to_info()

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

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

 libavcodec/ituh263enc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/ituh263enc.c b/libavcodec/ituh263enc.c
index 43ad080..7d4d9b0 100644
--- a/libavcodec/ituh263enc.c
+++ b/libavcodec/ituh263enc.c
@@ -88,7 +88,7 @@ static const uint8_t wrong_run[102] = {
 av_const int ff_h263_aspect_to_info(AVRational aspect){
     int i;
 
-    if(aspect.num==0) aspect= (AVRational){1,1};
+    if(aspect.num==0 || aspect.den==0) aspect= (AVRational){1,1};
 
     for(i=1; i<6; i++){
         if(av_cmp_q(ff_h263_pixel_aspect[i], aspect) == 0){



More information about the ffmpeg-cvslog mailing list