[FFmpeg-devel] [PATCH] Wrong duration in TS container (Ticket #1836)

Carl Eugen Hoyos cehoyos at ag.or.at
Tue Oct 23 22:31:37 CEST 2012


Heesuk Jung <heesuk.jung <at> lge.com> writes:

> +    if (bit_rate > 0) {
> +        if (duration >
> (filesize*8/bit_rate*limit_filesize_multiple*1000000)) {
> +            return 0;
> +        }
> +        return 1;
> +    } else {
> +        return 0;
> +    }

Ignore if you disagree, but since you have to resend:
Isn't the following more readable?

if (error_condition)
    return 0;
if (condition)
    return 1;
return 0;

Or even
if (error_condition)
    return 0;
return (condition);

And I wonder if you have to add two functions that are 
both only used once.

Thank you for working on this issue, Carl Eugen



More information about the ffmpeg-devel mailing list