diff mbox

[FFmpeg-devel,2/7] nutdec: Fix repeated condition

Message ID 20171017221159.2349-2-sw@jkqxz.net
State Accepted
Commit f2179afb01a35cce6189c878ae1ddfc84895676c
Headers show

Commit Message

Mark Thompson Oct. 17, 2017, 10:11 p.m. UTC
Fixes #6742.
---
 libavformat/nutdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Michael Niedermayer Oct. 18, 2017, 11:45 p.m. UTC | #1
On Tue, Oct 17, 2017 at 11:11:54PM +0100, Mark Thompson wrote:
> Fixes #6742.
> ---
>  libavformat/nutdec.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

ok, also please backport this if this issue was in releases

thx

[...]
Mark Thompson Oct. 19, 2017, 11:31 a.m. UTC | #2
On 19/10/17 00:45, Michael Niedermayer wrote:
> On Tue, Oct 17, 2017 at 11:11:54PM +0100, Mark Thompson wrote:
>> Fixes #6742.
>> ---
>>  libavformat/nutdec.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> ok, also please backport this if this issue was in releases

Sure.  It was introduced by 6621105877ce0d65724a8ab60b3a50160adbe65d, so it's in all supported releases (2.8 onwards).

Thanks,

- Mark
diff mbox

Patch

diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c
index 27440c88d4..9910ffe936 100644
--- a/libavformat/nutdec.c
+++ b/libavformat/nutdec.c
@@ -582,7 +582,7 @@  static int decode_info_header(NUTContext *nut)
             if (stream_id_plus1 && !strcmp(name, "r_frame_rate")) {
                 sscanf(str_value, "%d/%d", &st->r_frame_rate.num, &st->r_frame_rate.den);
                 if (st->r_frame_rate.num >= 1000LL*st->r_frame_rate.den ||
-                    st->r_frame_rate.num < 0 || st->r_frame_rate.num < 0)
+                    st->r_frame_rate.num < 0 || st->r_frame_rate.den < 0)
                     st->r_frame_rate.num = st->r_frame_rate.den = 0;
                 continue;
             }