comparison utils.c @ 8772:5a9485bd4421 libavcodec

Check that there are subtitle rects to encode in avcodec_encode_subtitle() Patch by Bj«Órn Axelsson ( gecko A acc D umu D se )
author superdump
date Mon, 09 Feb 2009 01:58:01 +0000
parents f7442819cacf
children 90c99bda19f5
comparison
equal deleted inserted replaced
8771:f7442819cacf 8772:5a9485bd4421
503 int ret; 503 int ret;
504 if(sub->start_display_time) { 504 if(sub->start_display_time) {
505 av_log(avctx, AV_LOG_ERROR, "start_display_time must be 0.\n"); 505 av_log(avctx, AV_LOG_ERROR, "start_display_time must be 0.\n");
506 return -1; 506 return -1;
507 } 507 }
508 if(sub->num_rects == 0 || !sub->rects)
509 return -1;
508 ret = avctx->codec->encode(avctx, buf, buf_size, sub); 510 ret = avctx->codec->encode(avctx, buf, buf_size, sub);
509 avctx->frame_number++; 511 avctx->frame_number++;
510 return ret; 512 return ret;
511 } 513 }
512 514