vlc | branch: master | Francois Cartegnie <[email protected]> | Wed May 17 20:33:47 2017 +0200| [23b152441e012debe1f36c763db1ae5950da3b10] | committer: Francois Cartegnie
codec: cc: add raw payload support > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=23b152441e012debe1f36c763db1ae5950da3b10 --- modules/codec/cc.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/modules/codec/cc.h b/modules/codec/cc.h index c221dacefd..7a76f2a734 100644 --- a/modules/codec/cc.h +++ b/modules/codec/cc.h @@ -33,6 +33,7 @@ enum cc_payload_type_e { CC_PAYLOAD_NONE, + CC_PAYLOAD_RAW, CC_PAYLOAD_GA94, CC_PAYLOAD_DVD, CC_PAYLOAD_REPLAYTV, @@ -106,7 +107,19 @@ static inline void cc_Extract( cc_data_t *c, enum cc_payload_type_e i_payload_ty c->i_payload_type = i_payload_type; c->i_payload_other_count = 0; - if( i_payload_type == CC_PAYLOAD_GA94 ) + if( i_payload_type == CC_PAYLOAD_RAW ) + { + for( int i = 0; i + 2 < i_src; i += 3 ) + { + if( c->i_data + 3 > CC_MAX_DATA_SIZE ) + break; + + const uint8_t *cc = &p_src[i]; + cc_AppendData( c, cc[0], &cc[1] ); + } + c->b_reorder = true; + } + else if( i_payload_type == CC_PAYLOAD_GA94 ) { /* cc_data() * u1 reserved(1) _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
