changeset 6975:230d2edc5502 libavcodec

return if bitrate is not specified or too low
author bcoudurier
date Sun, 01 Jun 2008 21:29:45 +0000
parents ccb0813842ea
children 4e96557381d9
files dnxhddata.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/dnxhddata.c	Sun Jun 01 20:51:44 2008 +0000
+++ b/dnxhddata.c	Sun Jun 01 21:29:45 2008 +0000
@@ -428,6 +428,8 @@
 {
     int i, j;
     int mbs = avctx->bit_rate/1000000;
+    if (!mbs)
+        return 0;
     for (i = 0; i < sizeof(ff_dnxhd_cid_table)/sizeof(CIDEntry); i++) {
         const CIDEntry *cid = &ff_dnxhd_cid_table[i];
         if (cid->width == avctx->width && cid->height == avctx->height &&