From 892d226857f9276d94f7734b0cd9af9ac3385086 Mon Sep 17 00:00:00 2001
From: Baptiste Coudurier <baptiste.coudurier@gmail.com>
Date: Sun, 1 Jun 2008 21:29:45 +0000
Subject: [PATCH] return if bitrate is not specified or too low

Originally committed as revision 13611 to svn://svn.ffmpeg.org/ffmpeg/trunk
---
 libavcodec/dnxhddata.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/dnxhddata.c b/libavcodec/dnxhddata.c
index fa6d13fa4ab..c1f2671c9d9 100644
--- a/libavcodec/dnxhddata.c
+++ b/libavcodec/dnxhddata.c
@@ -428,6 +428,8 @@ int ff_dnxhd_find_cid(AVCodecContext *avctx)
 {
     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 &&
-- 
GitLab