mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2024-12-24 20:01:42 +00:00
Some changes from Anshul
This commit is contained in:
parent
a6c36197ba
commit
64f56e6c9f
@ -22,7 +22,15 @@
|
||||
#include <limits.h>
|
||||
#include <errno.h>
|
||||
/* convert values between host and network byte order(big endian) */
|
||||
#include <arpa/inet.h>
|
||||
#ifdef _WIN32
|
||||
#include <winsock2.h>
|
||||
#else
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define snprintf(str,size,format,...) _snprintf(str,size-1,format,__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
|
||||
#include "dvb_subtitle_decoder.h"
|
||||
@ -90,7 +98,7 @@ times256(0xFF)
|
||||
|
||||
#define cm (crop_tab + MAX_NEG_CROP)
|
||||
|
||||
const char *dvb_language[]
|
||||
const char *dvb_language[]=
|
||||
{
|
||||
"und",
|
||||
"eng",
|
||||
@ -98,13 +106,13 @@ const char *dvb_language[]
|
||||
NULL
|
||||
};
|
||||
|
||||
static inline unsigned int bytestream_get_byte(const uint8_t **b)
|
||||
static __inline unsigned int bytestream_get_byte(const uint8_t **b)
|
||||
{
|
||||
(*b) += 1;
|
||||
return ((const uint8_t*)(*b -1))[0];
|
||||
}
|
||||
|
||||
static inline unsigned int bytestream_get_be16(const uint8_t **b)
|
||||
static __inline unsigned int bytestream_get_be16(const uint8_t **b)
|
||||
{
|
||||
(*b) += 2;
|
||||
return RB16(*b -2);
|
||||
@ -125,7 +133,7 @@ typedef struct GetBitContext {
|
||||
* @param bit_size the size of the buffer in bits
|
||||
* @return 0 on success, AVERROR_INVALIDDATA if the buffer_size would overflow.
|
||||
*/
|
||||
static inline int init_get_bits(GetBitContext *s, const uint8_t *buffer,
|
||||
static __inline int init_get_bits(GetBitContext *s, const uint8_t *buffer,
|
||||
int bit_size)
|
||||
{
|
||||
int buffer_size;
|
||||
@ -149,12 +157,12 @@ static inline int init_get_bits(GetBitContext *s, const uint8_t *buffer,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static inline int get_bits_count(const GetBitContext *s)
|
||||
static __inline int get_bits_count(const GetBitContext *s)
|
||||
{
|
||||
return s->index;
|
||||
}
|
||||
|
||||
static inline unsigned int get_bits(GetBitContext *s, int n)
|
||||
static __inline unsigned int get_bits(GetBitContext *s, int n)
|
||||
{
|
||||
register int tmp;
|
||||
unsigned int re_index = s->index;
|
||||
@ -172,7 +180,7 @@ static inline unsigned int get_bits(GetBitContext *s, int n)
|
||||
s->index = re_index;
|
||||
return tmp;
|
||||
}
|
||||
static inline unsigned int get_bits1(GetBitContext *s)
|
||||
static __inline unsigned int get_bits1(GetBitContext *s)
|
||||
{
|
||||
unsigned int index = s->index;
|
||||
uint8_t result = s->buffer[index >> 3];
|
||||
@ -1508,7 +1516,7 @@ static int dvbsub_display_end_segment(void *dvb_ctx, const uint8_t *buf,
|
||||
*/
|
||||
int dvbsub_decode(void *dvb_ctx,
|
||||
void *data, int *data_size,
|
||||
const unsigned char *buf,int buf_size)
|
||||
const unsigned char *buf, int buf_size)
|
||||
{
|
||||
DVBSubContext *ctx = (DVBSubContext *)dvb_ctx;
|
||||
// AVSubtitle *sub = data;
|
@ -201,8 +201,8 @@ int parse_PMT (int pos)
|
||||
| payload_start[i+4]);
|
||||
|
||||
/* There is no information about elementry stream */
|
||||
if(!ES_info_length)
|
||||
continue;
|
||||
/*if(!ES_info_length)
|
||||
continue; */
|
||||
|
||||
if (ccx_options.ts_cappid==0 && ccx_stream_type==ccx_options.ts_datastreamtype) // Found a stream with the type the user wants
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user