mirror of
https://github.com/game-stop/veejay.git
synced 2025-12-17 13:20:01 +01:00
fix many compile warnings
This commit is contained in:
@@ -132,6 +132,7 @@ uint64_t AVI_MAX_LEN = (UINT_MAX-(1<<20)*16-HEADERBYTES);
|
||||
uint64_t AVI_set_MAX_LEN( uint64_t n )
|
||||
{
|
||||
AVI_MAX_LEN = n;
|
||||
return n;
|
||||
}
|
||||
|
||||
uint64_t AVI_get_MAX_LEN()
|
||||
@@ -1041,7 +1042,7 @@ static int valid_info_tag(char *c)
|
||||
// returns the length of written stream (-1 on error)
|
||||
static int avi_parse_comments (int fd, char *buf, int space_left)
|
||||
{
|
||||
int len=0, readlen=0, k;
|
||||
int len=0, k;
|
||||
char *data, *c, *d;
|
||||
struct stat st;
|
||||
|
||||
@@ -1060,8 +1061,9 @@ static int avi_parse_comments (int fd, char *buf, int space_left)
|
||||
return -1;
|
||||
}
|
||||
|
||||
readlen = avi_read ( fd, data, st.st_size);
|
||||
|
||||
int readlen = avi_read ( fd, data, st.st_size);
|
||||
if( readlen < 0 )
|
||||
return -1;
|
||||
//printf("Read %d bytes from %d\n", readlen, fd);
|
||||
|
||||
c = data;
|
||||
|
||||
@@ -678,7 +678,6 @@ int lav_write_frame(lav_file_t *lav_file, uint8_t *buff, long size, long count)
|
||||
|
||||
int lav_write_audio(lav_file_t *lav_file, uint8_t *buff, long samps)
|
||||
{
|
||||
int res;
|
||||
#ifdef HAVE_LIBQUICKTIME
|
||||
int i, j;
|
||||
int16_t *qt_audio = (int16_t *)buff, **qt_audion;
|
||||
|
||||
@@ -1208,7 +1208,6 @@ int vj_el_get_video_frame(editlist *el, long nframe, uint8_t *dst[3])
|
||||
uint8_t *data = ( in_cache == NULL ? d->tmp_buffer: in_cache );
|
||||
int inter = 0;
|
||||
int got_picture = 0;
|
||||
int in_uv_len = 0;
|
||||
uint8_t *in[3] = { NULL,NULL,NULL };
|
||||
int strides[4] = { el_len_, el_uv_len_, el_uv_len_ ,0};
|
||||
uint8_t *dataplanes[3] = { data , data + el_len_, data + el_len_ + el_uv_len_ };
|
||||
@@ -1398,9 +1397,6 @@ int detect_pixel_format_with_ffmpeg( const char *filename )
|
||||
AVCodec *codec = NULL;
|
||||
AVCodecContext *codec_ctx = NULL;
|
||||
AVFormatContext *avformat_ctx = NULL;
|
||||
AVStream *avformat_stream = NULL;
|
||||
AVInputFormat *av_input_format = NULL;
|
||||
AVFrame *av_frame = NULL;
|
||||
AVPacket pkt;
|
||||
#if LIBAVCODEC_BUILD > 5400
|
||||
int err = avformat_open_input( &avformat_ctx, filename, NULL, NULL );
|
||||
@@ -1493,7 +1489,6 @@ further:
|
||||
}
|
||||
|
||||
codec_ctx = avformat_ctx->streams[vi]->codec;
|
||||
avformat_stream=avformat_ctx->streams[vi];
|
||||
#if LIBAVCODEC_BUILD > 5400
|
||||
if ( avcodec_open2( codec_ctx, codec, NULL ) < 0 )
|
||||
#else
|
||||
@@ -1507,7 +1502,6 @@ further:
|
||||
|
||||
veejay_memset( &pkt, 0, sizeof(AVPacket));
|
||||
AVFrame *f = avcodec_alloc_frame();
|
||||
int input_pix_fmt = -1;
|
||||
|
||||
int got_picture = 0;
|
||||
while( (av_read_frame(avformat_ctx, &pkt) >= 0 ) ) {
|
||||
@@ -1694,7 +1688,6 @@ int test_video_frame( lav_file_t *lav,int out_pix_fmt)
|
||||
|
||||
int vj_el_get_audio_frame(editlist *el, uint32_t nframe, uint8_t *dst)
|
||||
{
|
||||
long pos, asize;
|
||||
int ret = 0;
|
||||
uint64_t n;
|
||||
int ns0, ns1;
|
||||
@@ -1726,9 +1719,6 @@ int vj_el_get_audio_frame(editlist *el, uint32_t nframe, uint8_t *dst)
|
||||
ns1 = (double) (N_EL_FRAME(n) + 1) * el->audio_rate / el->video_fps;
|
||||
ns0 = (double) N_EL_FRAME(n) * el->audio_rate / el->video_fps;
|
||||
|
||||
//asize = el->audio_rate / el->video_fps;
|
||||
pos = nframe * asize;
|
||||
|
||||
ret = lav_set_audio_position(el->lav_fd[N_EL_FILE(n)], ns0);
|
||||
|
||||
if (ret < 0)
|
||||
@@ -1790,7 +1780,6 @@ int vj_el_init_422_frame(editlist *el, VJFrame *frame)
|
||||
int vj_el_get_audio_frame_at(editlist *el, uint32_t nframe, uint8_t *dst, int num )
|
||||
{
|
||||
// get audio from current frame + n frames
|
||||
long pos, asize;
|
||||
int ret = 0;
|
||||
uint64_t n;
|
||||
int ns0, ns1;
|
||||
@@ -1816,7 +1805,6 @@ int vj_el_get_audio_frame_at(editlist *el, uint32_t nframe, uint8_t *dst, int nu
|
||||
ns0 = (double) N_EL_FRAME(n) * el->audio_rate / el->video_fps;
|
||||
|
||||
//asize = el->audio_rate / el->video_fps;
|
||||
pos = nframe * asize;
|
||||
ret = lav_set_audio_position(el->lav_fd[N_EL_FILE(n)], ns0);
|
||||
|
||||
if (ret < 0)
|
||||
|
||||
@@ -63,7 +63,6 @@ int is_mapped( mmap_region_t *map, int offset, int size )
|
||||
{
|
||||
// check if memory is in mapped region
|
||||
off_t real_offset = PADDED( offset, map );
|
||||
size_t padding = offset % map->page_size;
|
||||
|
||||
long rel_o = (map->mem_offset > 0 ? offset - map->mem_offset : offset );
|
||||
|
||||
@@ -129,7 +128,6 @@ int munmap_file( mmap_region_t *map )
|
||||
|
||||
int mmap_read( mmap_region_t *map,int offset, int bytes, uint8_t *buf )
|
||||
{
|
||||
size_t padding = offset % map->page_size;
|
||||
if( !is_mapped( map, offset, bytes ))
|
||||
{
|
||||
remap_file( map, offset );
|
||||
|
||||
Reference in New Issue
Block a user