[FFmpeg-devel] [PATCH]Show rc_max_rate if bitrate is not set

Michael Niedermayer michaelni at gmx.at
Thu Jul 25 01:06:07 CEST 2013


On Thu, Jul 25, 2013 at 12:05:40AM +0200, Carl Eugen Hoyos wrote:
> Hi!
> 
> Users are probable interested in the max bitrate if no (average) bitrate was 
> set in the MPEG stream, see 25b7aa9.
> 
> Please comment, Carl Eugen

[...]
> diff --git a/libavformat/utils.c b/libavformat/utils.c
> index 9fd5e6e..2078a1b 100644
> --- a/libavformat/utils.c
> +++ b/libavformat/utils.c
> @@ -2211,6 +2211,9 @@ static void estimate_timings_from_bit_rate(AVFormatContext *ic)
>              st = ic->streams[i];
>              if (st->codec->bit_rate > 0)
>              bit_rate += st->codec->bit_rate;
> +            else if (st->codec->rc_max_rate > 0) {
> +                bit_rate += st->codec->rc_max_rate;
> +            }
>          }
>          ic->bit_rate = bit_rate;

iam not sure about this, this could cause problems

[...9

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

He who knows, does not speak. He who speaks, does not know. -- Lao Tsu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130725/eaeb4871/attachment.asc>


More information about the ffmpeg-devel mailing list