mov: fix assigment check

Message ID 20141024225154.6C3CF5DDFC@aruru.libav.org
State New
Headers show

Commit Message

Janne Grunau Oct. 24, 2014, 10:51 p.m.
Module: libav
Branch: master
Commit: 50dbe6b3544fa64d5611e16553bf542fd71276b8

Author:    Vittorio Giovara <vittorio.giovara@gmail.com>
Committer: Vittorio Giovara <vittorio.giovara@gmail.com>
Date:      Mon Oct 20 14:11:25 2014 +0100

mov: fix assigment check

CC: libav-stable@libav.org
Bug-Id: CID 1197050

---

 libavformat/mov.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 0e29bf3..efc9314 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -3192,7 +3192,7 @@  static int mov_read_header(AVFormatContext *s)
         MOVStreamContext *sc = st->priv_data;
 
         if (st->codec->codec_type == AVMEDIA_TYPE_SUBTITLE) {
-            if (st->codec->width <= 0 && st->codec->width <= 0) {
+            if (st->codec->width <= 0 || st->codec->height <= 0) {
                 st->codec->width  = sc->width;
                 st->codec->height = sc->height;
             }