[vlc-commits] decklink access: fix CC decoding with some sources

Rafaël Carré git at videolan.org
Fri Mar 29 14:56:56 CET 2013


vlc | branch: master | Rafaël Carré <funman at videolan.org> | Fri Mar 29 14:54:33 2013 +0100| [085a335d1cfecab5bf6083e60ee28f007a262454] | committer: Rafaël Carré

decklink access: fix CC decoding with some sources

These sources have some data appended after the CC units.
Example: 0x91 0xe0 0x65 0x6e 0x67 0x7e 0x3f 0xff
                     e    n    g
Probably a language code.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=085a335d1cfecab5bf6083e60ee28f007a262454
---

 modules/access/decklink.cpp |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/modules/access/decklink.cpp b/modules/access/decklink.cpp
index b188d8d..c9be327 100644
--- a/modules/access/decklink.cpp
+++ b/modules/access/decklink.cpp
@@ -340,7 +340,9 @@ HRESULT DeckLinkCaptureDelegate::VideoInputFrameArrived(IDeckLinkVideoInputFrame
                         if (!(cc_count & 0xe0))
                             continue;
                         cc_count &= 0x1f;
-                        if ((len - 13) != cc_count * 3)
+
+                        /* FIXME: parse additional data (CC language?) */
+                        if ((len - 13) < cc_count * 3)
                             continue;
 
                         if (cdp[len - 4] != 0x74) /* footer id */



More information about the vlc-commits mailing list