mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
cleanup: shut up more warnings
This commit is contained in:
committed by
Uoti Urpala
parent
40f6ab5064
commit
b68f9fef32
@@ -283,9 +283,9 @@ static int dts_decode_header(uint8_t *indata_ptr, int *rate, int *nblks, int *sf
|
||||
{
|
||||
int ftype;
|
||||
int surp;
|
||||
int unknown_bit;
|
||||
int unknown_bit av_unused;
|
||||
int fsize;
|
||||
int amode;
|
||||
int amode av_unused;
|
||||
|
||||
int word_mode;
|
||||
int le_mode;
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include <dlfcn.h>
|
||||
#endif
|
||||
#include "path.h"
|
||||
|
||||
#include "libavutil/attributes.h"
|
||||
#include "ad_internal.h"
|
||||
#include "loader/wine/windef.h"
|
||||
|
||||
@@ -41,6 +41,9 @@ static const ad_info_t info = {
|
||||
|
||||
LIBAD_EXTERN(realaud)
|
||||
|
||||
void *__builtin_new(unsigned long size);
|
||||
void __builtin_delete(void *ize);
|
||||
|
||||
void *__builtin_new(unsigned long size) {
|
||||
return malloc(size);
|
||||
}
|
||||
@@ -414,7 +417,7 @@ static void uninit(sh_audio_t *sh){
|
||||
}
|
||||
|
||||
static int decode_audio(sh_audio_t *sh,unsigned char *buf,int minlen,int maxlen){
|
||||
int result;
|
||||
int result av_unused;
|
||||
int len=-1;
|
||||
|
||||
if(sh->a_in_buffer_len<=0){
|
||||
|
||||
@@ -1638,7 +1638,7 @@ static int teletext_set_format(priv_vbi_t * priv, teletext_format flag)
|
||||
*/
|
||||
static void vbi_add_dec(priv_vbi_t * priv, char *dec)
|
||||
{
|
||||
int count, shift;
|
||||
int count;
|
||||
if (!dec)
|
||||
return;
|
||||
if (!priv->on)
|
||||
@@ -1657,7 +1657,6 @@ static void vbi_add_dec(priv_vbi_t * priv, char *dec)
|
||||
else
|
||||
priv->pagenumdec=0;
|
||||
} else {
|
||||
shift = count * 4;
|
||||
count++;
|
||||
priv->pagenumdec=
|
||||
(((priv->pagenumdec)<<4|(*dec-'0'))&0xfff)|(count<<12);
|
||||
|
||||
@@ -109,7 +109,7 @@ int set_video_colors(sh_video_t *sh_video, const char *item, int value)
|
||||
/* try software control */
|
||||
const struct vd_functions *vd = sh_video->vd_driver;
|
||||
if (vd &&
|
||||
vd->control(sh_video, VDCTRL_SET_EQUALIZER, item, (int *) value)
|
||||
vd->control(sh_video, VDCTRL_SET_EQUALIZER, (void *)item, value)
|
||||
== CONTROL_OK)
|
||||
return 1;
|
||||
mp_tmsg(MSGT_DECVIDEO, MSGL_V, "Video attribute '%s' is not supported by selected vo & vd.\n",
|
||||
@@ -135,7 +135,7 @@ int get_video_colors(sh_video_t *sh_video, const char *item, int *value)
|
||||
/* try software control */
|
||||
const struct vd_functions *vd = sh_video->vd_driver;
|
||||
if (vd)
|
||||
return vd->control(sh_video, VDCTRL_GET_EQUALIZER, item, value);
|
||||
return vd->control(sh_video, VDCTRL_GET_EQUALIZER, (void *)item, value);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -796,9 +796,10 @@ static struct mp_image *decode(struct sh_video *sh, void *data, int len,
|
||||
// HACK: make PNGs decode normally instead of as CorePNG delta frames
|
||||
pkt.flags = AV_PKT_FLAG_KEY;
|
||||
// The avcodec opaque field stupidly supports only int64_t type
|
||||
*(double *)&avctx->reordered_opaque = *reordered_pts;
|
||||
union pts { int64_t i; double d; };
|
||||
avctx->reordered_opaque = (union pts){.d = *reordered_pts}.i;
|
||||
ret = avcodec_decode_video2(avctx, pic, &got_picture, &pkt);
|
||||
*reordered_pts = *(double *)&pic->reordered_opaque;
|
||||
*reordered_pts = (union pts){.i = pic->reordered_opaque}.d;
|
||||
|
||||
dr1= ctx->do_dr1;
|
||||
if(ret<0) mp_msg(MSGT_DECVIDEO, MSGL_WARN, "Error while decoding frame!\n");
|
||||
|
||||
@@ -84,6 +84,10 @@ static int bufsz = 0;
|
||||
static int dll_type = 0; /* 0 = unix dlopen, 1 = win32 dll */
|
||||
#endif
|
||||
|
||||
void *__builtin_vec_new(unsigned long size);
|
||||
void __builtin_vec_delete(void *mem);
|
||||
void __pure_virtual(void);
|
||||
|
||||
void *__builtin_vec_new(unsigned long size) {
|
||||
return malloc(size);
|
||||
}
|
||||
|
||||
@@ -173,10 +173,9 @@ decode_rle_sgi(SGIInfo *info, unsigned char *data, mp_image_t *mpi)
|
||||
{
|
||||
unsigned char *rle_data, *dest_row;
|
||||
uint32_t *starttab;
|
||||
int y, z, xsize, ysize, zsize, chan_offset;
|
||||
int y, z, ysize, zsize, chan_offset;
|
||||
long start_offset;
|
||||
|
||||
xsize = info->xsize;
|
||||
ysize = info->ysize;
|
||||
zsize = info->zsize;
|
||||
|
||||
|
||||
@@ -1139,7 +1139,7 @@ find_breaks(struct vf_priv_s *p, struct frame_stats *s)
|
||||
|
||||
static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts)
|
||||
{
|
||||
mp_image_t *dmpi;
|
||||
mp_image_t *dmpi = NULL;
|
||||
struct vf_priv_s *p = vf->priv;
|
||||
unsigned char **planes, **old_planes;
|
||||
struct frame_stats *s = &p->stats[p->inframes & 1];
|
||||
|
||||
@@ -133,7 +133,7 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){
|
||||
|
||||
if(vf->priv->pp || !(mpi->flags&MP_IMGFLAG_DIRECT)){
|
||||
// do the postprocessing! (or copy if no DR)
|
||||
pp_postprocess(mpi->planes ,mpi->stride,
|
||||
pp_postprocess((const uint8_t **)mpi->planes, mpi->stride,
|
||||
vf->dmpi->planes,vf->dmpi->stride,
|
||||
(mpi->w+7)&(~7),mpi->h,
|
||||
mpi->qscale, mpi->qstride,
|
||||
@@ -162,9 +162,7 @@ static const unsigned int fmt_list[]={
|
||||
};
|
||||
|
||||
static int vf_open(vf_instance_t *vf, char *args){
|
||||
char *endptr, *name;
|
||||
int i;
|
||||
int hex_mode=0;
|
||||
|
||||
vf->query_format=query_format;
|
||||
vf->control=control;
|
||||
@@ -180,15 +178,7 @@ static int vf_open(vf_instance_t *vf, char *args){
|
||||
vf->priv->outfmt=vf_match_csp(&vf->next,fmt_list,IMGFMT_YV12);
|
||||
if(!vf->priv->outfmt) return 0; // no csp match :(
|
||||
|
||||
if(args){
|
||||
hex_mode= strtol(args, &endptr, 0);
|
||||
if(*endptr){
|
||||
name= args;
|
||||
}else
|
||||
name= NULL;
|
||||
}else{
|
||||
name="de";
|
||||
}
|
||||
char *name = args ? args : "de";
|
||||
|
||||
for(i=0; i<=PP_QUALITY_MAX; i++){
|
||||
vf->priv->ppMode[i]= pp_get_mode_by_name_and_quality(name, i);
|
||||
|
||||
@@ -377,7 +377,7 @@ static void start_slice(struct vf_instance *vf, mp_image_t *mpi){
|
||||
|
||||
static void scale(struct SwsContext *sws1, struct SwsContext *sws2, uint8_t *src[MP_MAX_PLANES], int src_stride[MP_MAX_PLANES],
|
||||
int y, int h, uint8_t *dst[MP_MAX_PLANES], int dst_stride[MP_MAX_PLANES], int interlaced){
|
||||
uint8_t *src2[MP_MAX_PLANES]={src[0], src[1], src[2], src[3]};
|
||||
const uint8_t *src2[MP_MAX_PLANES]={src[0], src[1], src[2], src[3]};
|
||||
#if HAVE_BIGENDIAN
|
||||
uint32_t pal2[256];
|
||||
if (src[1] && !src[2]){
|
||||
@@ -671,7 +671,7 @@ static const m_option_t vf_opts_fields[] = {
|
||||
{"param2", ST_OFF(param[1]), CONF_TYPE_DOUBLE, M_OPT_RANGE, 0.0, 100.0, NULL},
|
||||
// Note that here the 2 field is NULL (ie 0)
|
||||
// As we want this option to act on the option struct itself
|
||||
{"presize", 0, CONF_TYPE_OBJ_PRESETS, 0, 0, 0, &size_preset},
|
||||
{"presize", 0, CONF_TYPE_OBJ_PRESETS, 0, 0, 0, (void *)&size_preset},
|
||||
{"noup", ST_OFF(noup), CONF_TYPE_INT, M_OPT_RANGE, 0, 2, NULL},
|
||||
{"arnd", ST_OFF(accurate_rnd), CONF_TYPE_FLAG, 0, 0, 1, NULL},
|
||||
{ NULL, NULL, 0, 0, 0, 0, NULL }
|
||||
|
||||
@@ -134,7 +134,7 @@ static void scale_image(struct vf_priv_s* priv, mp_image_t *mpi)
|
||||
priv->buffer = av_malloc(dst_stride[0]*priv->dh);
|
||||
|
||||
dst[0] = priv->buffer;
|
||||
sws_scale(priv->ctx, mpi->planes, mpi->stride, 0, priv->dh, dst, dst_stride);
|
||||
sws_scale(priv->ctx, (const uint8_t **)mpi->planes, mpi->stride, 0, priv->dh, dst, dst_stride);
|
||||
}
|
||||
|
||||
static void start_slice(struct vf_instance *vf, mp_image_t *mpi)
|
||||
@@ -157,7 +157,7 @@ static void draw_slice(struct vf_instance *vf, unsigned char** src,
|
||||
int dst_stride[MP_MAX_PLANES] = {0};
|
||||
dst_stride[0] = vf->priv->stride;
|
||||
dst[0] = vf->priv->buffer;
|
||||
sws_scale(vf->priv->ctx, src, stride, y, h, dst, dst_stride);
|
||||
sws_scale(vf->priv->ctx, (const uint8_t **)src, stride, y, h, dst, dst_stride);
|
||||
}
|
||||
vf_next_draw_slice(vf,src,stride,w,h,x,y);
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <string.h>
|
||||
#include <inttypes.h>
|
||||
#include <assert.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "mp_msg.h"
|
||||
#include "libavutil/avutil.h"
|
||||
@@ -156,11 +157,11 @@ static inline void blur(uint8_t *dst, uint8_t *src, int w, int h, int dstStride,
|
||||
static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){
|
||||
int cw= mpi->w >> mpi->chroma_x_shift;
|
||||
int ch= mpi->h >> mpi->chroma_y_shift;
|
||||
FilterParam *f= &vf->priv;
|
||||
bool threshold = vf->priv->luma.threshold || vf->priv->chroma.threshold;
|
||||
|
||||
mp_image_t *dmpi=vf_get_image(vf->next,mpi->imgfmt,
|
||||
MP_IMGTYPE_TEMP, MP_IMGFLAG_ACCEPT_STRIDE|
|
||||
(f->threshold) ? MP_IMGFLAG_READABLE : 0,
|
||||
(threshold ? MP_IMGFLAG_READABLE : 0),
|
||||
mpi->w,mpi->h);
|
||||
|
||||
assert(mpi->flags&MP_IMGFLAG_PLANAR);
|
||||
|
||||
@@ -175,12 +175,12 @@ static void filter(struct vf_priv_s *p, uint8_t *dst[3], uint8_t *src[3], int ds
|
||||
for(i=0; i<count; i++){
|
||||
const int x1= offset[i+count-1][0];
|
||||
const int y1= offset[i+count-1][1];
|
||||
int offset, out_size;
|
||||
int offset;
|
||||
p->frame->data[0]= p->src[0] + x1 + y1 * p->frame->linesize[0];
|
||||
p->frame->data[1]= p->src[1] + x1/2 + y1/2 * p->frame->linesize[1];
|
||||
p->frame->data[2]= p->src[2] + x1/2 + y1/2 * p->frame->linesize[2];
|
||||
|
||||
out_size = avcodec_encode_video(p->avctx_enc[i], p->outbuf, p->outbuf_size, p->frame);
|
||||
avcodec_encode_video(p->avctx_enc[i], p->outbuf, p->outbuf_size, p->frame);
|
||||
p->frame_dec = p->avctx_enc[i]->coded_frame;
|
||||
|
||||
offset= (BLOCK-x1) + (BLOCK-y1)*p->frame_dec->linesize[0];
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
#include <stdint.h>
|
||||
#include "aac_hdr.h"
|
||||
#include "libavutil/attributes.h"
|
||||
|
||||
/// \param srate (out) sample rate
|
||||
/// \param num (out) number of audio frames in this ADTS frame
|
||||
@@ -27,7 +28,7 @@
|
||||
/// aac_parse_frames needs a buffer at least 8 bytes long
|
||||
int aac_parse_frame(uint8_t *buf, int *srate, int *num)
|
||||
{
|
||||
int i = 0, sr, fl = 0, id;
|
||||
int i = 0, sr, fl = 0, id av_unused;
|
||||
static int srates[] = {96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, 8000, 0, 0, 0};
|
||||
|
||||
if((buf[i] != 0xFF) || ((buf[i+1] & 0xF6) != 0xF0))
|
||||
|
||||
@@ -139,7 +139,7 @@ static int get_ext_stream_properties(char *buf, int buf_len, int stream_num, str
|
||||
{
|
||||
int pos=0;
|
||||
uint8_t *buffer = &buf[0];
|
||||
uint64_t avg_ft;
|
||||
uint64_t avg_ft av_unused;
|
||||
unsigned bitrate;
|
||||
|
||||
while ((pos = find_asf_guid(buf, asf_ext_stream_header, pos, buf_len)) >= 0) {
|
||||
|
||||
@@ -200,7 +200,7 @@ static int demux_asf_read_packet(demuxer_t *demux,unsigned char *data,int len,in
|
||||
*/
|
||||
static void get_payload_extension_data(demuxer_t *demux, unsigned char** pp, unsigned char id, unsigned int seq, int *keyframe, uint64_t *seg_time){
|
||||
struct asf_priv* asf = demux->priv;
|
||||
uint64_t payload_time; //100ns units
|
||||
uint64_t payload_time = -1; //100ns units
|
||||
int i, ext_max, ext_timing_index;
|
||||
uint8_t *pi = *pp+4;
|
||||
|
||||
@@ -362,8 +362,8 @@ static int demux_asf_fill_buffer(demuxer_t *demux, demux_stream_t *ds){
|
||||
unsigned char segtype=p[1];
|
||||
unsigned padding;
|
||||
unsigned plen;
|
||||
unsigned sequence;
|
||||
unsigned long time=0;
|
||||
unsigned sequence av_unused;
|
||||
unsigned long time av_unused = 0;
|
||||
unsigned short duration=0;
|
||||
|
||||
int segs=1;
|
||||
|
||||
@@ -808,7 +808,7 @@ static int demux_avi_control(demuxer_t *demuxer,int cmd, void *arg){
|
||||
case DEMUXER_CTRL_SWITCH_VIDEO: {
|
||||
int audio = (cmd == DEMUXER_CTRL_SWITCH_AUDIO);
|
||||
demux_stream_t *ds = audio ? demuxer->audio : demuxer->video;
|
||||
void **streams = audio ? demuxer->a_streams : demuxer->v_streams;
|
||||
void **streams = audio ? (void **)demuxer->a_streams : (void **)demuxer->v_streams;
|
||||
int maxid = FFMIN(100, audio ? MAX_A_STREAMS : MAX_V_STREAMS);
|
||||
int chunkid;
|
||||
if (ds->id < -1)
|
||||
|
||||
@@ -158,7 +158,7 @@ static int demux_film_fill_buffer(demuxer_t *demuxer, demux_stream_t *ds)
|
||||
memcpy( tmp, buf, film_chunk.chunk_size );
|
||||
}
|
||||
else {/* for 16bit */
|
||||
unsigned short* tmp = dp->buffer;
|
||||
unsigned short *tmp = (unsigned short *)dp->buffer;
|
||||
unsigned short buf[film_chunk.chunk_size/2];
|
||||
for(i = 0; i < film_chunk.chunk_size/4; i++) {
|
||||
buf[i*2] = tmp[i];
|
||||
|
||||
@@ -89,7 +89,7 @@ static int demux_gif_fill_buffer(demuxer_t *demuxer, demux_stream_t *ds)
|
||||
uint8_t *buf = NULL;
|
||||
int refmode = 0;
|
||||
int transparency = 0;
|
||||
uint8_t transparent_col;
|
||||
uint8_t transparent_col = 0;
|
||||
|
||||
while (type != IMAGE_DESC_RECORD_TYPE) {
|
||||
if (DGifGetRecordType(gif, &type) == GIF_ERROR) {
|
||||
|
||||
@@ -622,7 +622,7 @@ static int gen_sh_audio(sh_audio_t* sh, mov_track_t* trak, int timescale) {
|
||||
// ([int32_t size,int32_t type,some data ],repeat)
|
||||
} my_stdata;
|
||||
#endif
|
||||
int version, adjust;
|
||||
int version = -1, adjust;
|
||||
int is_vorbis = 0;
|
||||
sh->format=trak->fourcc;
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "mp_msg.h"
|
||||
#include "options.h"
|
||||
|
||||
#include "libavutil/attributes.h"
|
||||
#include "libmpcodecs/dec_audio.h"
|
||||
#include "stream/stream.h"
|
||||
#include "demuxer.h"
|
||||
@@ -286,12 +287,12 @@ static void new_audio_stream(demuxer_t *demux, int aid){
|
||||
}
|
||||
|
||||
static int demux_mpg_read_packet(demuxer_t *demux,int id){
|
||||
int d;
|
||||
int d av_unused;
|
||||
int len;
|
||||
int set_pts=0; // !=0 iff pts has been set to a proper value
|
||||
unsigned char c=0;
|
||||
unsigned long long pts=0;
|
||||
unsigned long long dts=0;
|
||||
unsigned long long dts av_unused = 0;
|
||||
int l;
|
||||
int pes_ext2_subid=-1;
|
||||
double stream_pts = MP_NOPTS_VALUE;
|
||||
@@ -671,7 +672,7 @@ static inline void update_stats(int head)
|
||||
}
|
||||
|
||||
static int demux_mpg_probe(demuxer_t *demuxer) {
|
||||
int pes=1;
|
||||
int pes av_unused = 1;
|
||||
int tmp;
|
||||
off_t tmppos;
|
||||
int file_format = DEMUXER_TYPE_UNKNOWN;
|
||||
|
||||
@@ -411,7 +411,7 @@ static void demux_ogg_check_comments(demuxer_t *d, ogg_stream_t *os,
|
||||
};
|
||||
|
||||
while (*cmt) {
|
||||
hdr = NULL;
|
||||
hdr = val = NULL;
|
||||
if (!strncasecmp(*cmt, "LANGUAGE=", 9)) {
|
||||
val = *cmt + 9;
|
||||
if (ogg_d->subs[id].text)
|
||||
|
||||
@@ -198,7 +198,7 @@ static int pva_get_payload(demuxer_t *d, pva_payload_t *payload)
|
||||
{
|
||||
uint8_t flags,pes_head_len;
|
||||
uint16_t pack_size;
|
||||
off_t next_offset,pva_payload_start;
|
||||
off_t pva_payload_start;
|
||||
unsigned char buffer[256];
|
||||
#ifndef PVA_NEW_PREBYTES_CODE
|
||||
demux_packet_t * dp; //hack to deliver the preBytes (see PVA doc)
|
||||
@@ -273,7 +273,6 @@ static int pva_get_payload(demuxer_t *d, pva_payload_t *payload)
|
||||
pack_size=stream_read_word(d->stream);
|
||||
mp_msg(MSGT_DEMUX,MSGL_DBG2,"demux_pva::pva_get_payload(): pack_size=%u field read at offset %"PRIu64"\n",pack_size,(int64_t)stream_tell(d->stream)-2);
|
||||
pva_payload_start=stream_tell(d->stream);
|
||||
next_offset=pva_payload_start+pack_size;
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@@ -577,7 +577,7 @@ static int demux_real_fill_buffer(demuxer_t *demuxer, demux_stream_t *dsds)
|
||||
#endif
|
||||
int flags;
|
||||
int version;
|
||||
int reserved;
|
||||
int reserved av_unused;
|
||||
demux_packet_t *dp;
|
||||
int x, sps, cfs, sph, spc, w;
|
||||
int audioreorder_getnextpk = 0;
|
||||
@@ -892,7 +892,7 @@ got_video:
|
||||
if (0x40==(vpkg_header&0xc0)) {
|
||||
// seems to be a very short header
|
||||
// 2 bytes, purpose of the second byte yet unknown
|
||||
int bummer;
|
||||
int bummer av_unused;
|
||||
bummer=stream_read_char(demuxer->stream); --len;
|
||||
mp_dbg(MSGT_DEMUX,MSGL_DBG2, "%02X",bummer);
|
||||
vpkg_offset=0;
|
||||
@@ -1267,7 +1267,7 @@ static demuxer_t* demux_open_real(demuxer_t* demuxer)
|
||||
int sub_packet_size;
|
||||
int sub_packet_h;
|
||||
int version;
|
||||
int flavor;
|
||||
int flavor av_unused;
|
||||
int coded_frame_size;
|
||||
int codecdata_length;
|
||||
int i;
|
||||
@@ -1321,6 +1321,8 @@ static demuxer_t* demux_open_real(demuxer_t* demuxer)
|
||||
sh->samplesize = 16;
|
||||
sh->samplerate = 8000;
|
||||
frame_size = 240;
|
||||
sub_packet_h = 0;
|
||||
sub_packet_size = coded_frame_size = 0x14;
|
||||
strcpy(buf, "14_4");
|
||||
} else {
|
||||
stream_skip(demuxer->stream, 2); // 00 00
|
||||
@@ -1387,7 +1389,7 @@ static demuxer_t* demux_open_real(demuxer_t* demuxer)
|
||||
// sh->format = 0x2000;
|
||||
break;
|
||||
case MKTAG('1', '4', '_', '4'):
|
||||
sh->wf->nBlockAlign = 0x14;
|
||||
sh->wf->nBlockAlign = coded_frame_size;
|
||||
break;
|
||||
|
||||
case MKTAG('2', '8', '_', '8'):
|
||||
@@ -1686,7 +1688,7 @@ header_end:
|
||||
} else {
|
||||
priv->audio_curpos = priv->str_data_offset[demuxer->audio->id] + 18;
|
||||
stream_seek(demuxer->stream, priv->str_data_offset[demuxer->audio->id]+10);
|
||||
priv->a_num_of_packets=priv->a_num_of_packets = stream_read_dword(demuxer->stream);
|
||||
priv->a_num_of_packets = stream_read_dword(demuxer->stream);
|
||||
priv->video_curpos = priv->str_data_offset[demuxer->video->id] + 18;
|
||||
stream_seek(demuxer->stream, priv->str_data_offset[demuxer->video->id]+10);
|
||||
priv->v_num_of_packets = stream_read_dword(demuxer->stream);
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include "stream/stream.h"
|
||||
#include "demuxer.h"
|
||||
#include "stheader.h"
|
||||
#include "libavutil/attributes.h"
|
||||
|
||||
#define RoQ_INFO 0x1001
|
||||
#define RoQ_QUAD_CODEBOOK 0x1002
|
||||
@@ -110,7 +111,7 @@ static demuxer_t* demux_open_roq(demuxer_t* demuxer)
|
||||
roq_data_t *roq_data = malloc(sizeof(roq_data_t));
|
||||
int chunk_id;
|
||||
int chunk_size;
|
||||
int chunk_arg;
|
||||
int chunk_arg av_unused;
|
||||
int last_chunk_id = 0;
|
||||
int largest_audio_chunk = 0;
|
||||
int fps;
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
#include "config.h"
|
||||
#include "mp_msg.h"
|
||||
|
||||
#include "libavutil/attributes.h"
|
||||
#include "stream/stream.h"
|
||||
#include "demuxer.h"
|
||||
#include "stheader.h"
|
||||
@@ -103,7 +103,7 @@ static int demux_smjpeg_fill_buffer(demuxer_t *demux, demux_stream_t *ds)
|
||||
static demuxer_t* demux_open_smjpeg(demuxer_t* demuxer){
|
||||
sh_video_t* sh_video;
|
||||
sh_audio_t* sh_audio;
|
||||
unsigned int htype = 0, hleng;
|
||||
unsigned int htype = 0, hleng av_unused;
|
||||
int i = 0;
|
||||
|
||||
/* file header */
|
||||
|
||||
@@ -661,7 +661,7 @@ static int a52_check(char *buf, int len)
|
||||
|
||||
static off_t ts_detect_streams(demuxer_t *demuxer, tsdemux_init_t *param)
|
||||
{
|
||||
int video_found = 0, audio_found = 0, sub_found = 0, i, num_packets = 0, req_apid, req_vpid, req_spid;
|
||||
int video_found = 0, audio_found = 0, sub_found av_unused = 0, i, num_packets = 0, req_apid, req_vpid, req_spid;
|
||||
int is_audio, is_video, is_sub, has_tables;
|
||||
int32_t p, chosen_pid = 0;
|
||||
off_t pos=0, ret = 0, init_pos, end_pos;
|
||||
@@ -2764,7 +2764,7 @@ static int ts_parse(demuxer_t *demuxer , ES_stream_t *es, unsigned char *packet,
|
||||
{
|
||||
ES_stream_t *tss;
|
||||
int buf_size, is_start, pid, base;
|
||||
int len, cc, cc_ok, afc, retv = 0, is_video, is_audio, is_sub;
|
||||
int len, cc, cc_ok av_unused, afc, retv = 0, is_video, is_audio, is_sub;
|
||||
ts_priv_t * priv = (ts_priv_t*) demuxer->priv;
|
||||
stream_t *stream = demuxer->stream;
|
||||
char *p;
|
||||
|
||||
@@ -241,7 +241,7 @@ typedef struct demux_attachment
|
||||
|
||||
typedef struct demuxer {
|
||||
const demuxer_desc_t *desc; ///< Demuxer description structure
|
||||
char *filetype; // format name when not identified by demuxer (libavformat)
|
||||
const char *filetype; // format name when not identified by demuxer (libavformat)
|
||||
off_t filepos; // input stream current pos.
|
||||
off_t movi_start;
|
||||
off_t movi_end;
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
#include "config.h"
|
||||
#include "mpeg_hdr.h"
|
||||
|
||||
#include "libavutil/attributes.h"
|
||||
#include "mp_msg.h"
|
||||
|
||||
static float frameratecode2framerate[16] = {
|
||||
@@ -45,7 +45,7 @@ static float frameratecode2framerate[16] = {
|
||||
|
||||
int mp_header_process_sequence_header (mp_mpeg_header_t * picture, const unsigned char * buffer)
|
||||
{
|
||||
int width, height;
|
||||
int width av_unused, height;
|
||||
|
||||
if ((buffer[6] & 0x20) != 0x20){
|
||||
fprintf(stderr, "missing marker bit!\n");
|
||||
@@ -209,7 +209,7 @@ static int read_timeinc(mp_mpeg_header_t * picture, unsigned char * buffer, int
|
||||
|
||||
int mp4_header_process_vol(mp_mpeg_header_t * picture, unsigned char * buffer)
|
||||
{
|
||||
unsigned int n, aspect=0, aspectw=0, aspecth=0, x=1, v;
|
||||
unsigned int n, aspect=0, aspectw av_unused=0, aspecth av_unused=0, x=1, v;
|
||||
|
||||
//begins with 0x0000012x
|
||||
picture->fps = 0;
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include "yuv4mpeg.h"
|
||||
#include "yuv4mpeg_intern.h"
|
||||
#include "mp_msg.h"
|
||||
#include "libavutil/attributes.h"
|
||||
|
||||
static int _y4mparam_allow_unknown_tags = 1; /* default is forgiveness */
|
||||
|
||||
@@ -412,7 +413,7 @@ int y4m_parse_stream_tags(char *s, y4m_stream_info_t *i)
|
||||
|
||||
static int y4m_parse_frame_tags(char *s, y4m_frame_info_t *i)
|
||||
{
|
||||
char *token, *value;
|
||||
char *token, *value av_unused;
|
||||
char tag;
|
||||
int err;
|
||||
|
||||
|
||||
@@ -349,7 +349,7 @@ draw_frame(uint8_t *src[]) {
|
||||
break;
|
||||
}
|
||||
|
||||
sws_scale(sws,src,stride,0,src_height,image,image_stride);
|
||||
sws_scale(sws,(const uint8_t **)src,stride,0,src_height,image,image_stride);
|
||||
|
||||
/* Now 'ASCIInate' the image */
|
||||
if (fast)
|
||||
@@ -369,7 +369,7 @@ draw_slice(uint8_t *src[], int stride[],
|
||||
int dx2 = screen_x + ((x+w) * screen_w / src_width);
|
||||
int dy2 = screen_y + ((y+h) * screen_h / src_height);
|
||||
|
||||
sws_scale(sws,src,stride,y,h,image,image_stride);
|
||||
sws_scale(sws,(const uint8_t **)src,stride,y,h,image,image_stride);
|
||||
|
||||
/* Now 'ASCIInate' the image */
|
||||
if (fast)
|
||||
@@ -668,7 +668,7 @@ static int preinit(const char *arg)
|
||||
{
|
||||
char * hidis = NULL;
|
||||
struct stat sbuf;
|
||||
int fd, vt, major, minor;
|
||||
int fd, vt;
|
||||
FILE * fp;
|
||||
char fname[12];
|
||||
|
||||
@@ -686,8 +686,7 @@ static int preinit(const char *arg)
|
||||
/* check only, if no driver is explicit set */
|
||||
fd = dup (fileno (stderr));
|
||||
fstat (fd, &sbuf);
|
||||
major = sbuf.st_rdev >> 8;
|
||||
vt = minor = sbuf.st_rdev & 0xff;
|
||||
vt = sbuf.st_rdev & 0xff; // hi: major, low: minor
|
||||
close (fd);
|
||||
sprintf (fname, "/dev/vcsa%2.2i", vt);
|
||||
fp = fopen (fname, "w+");
|
||||
|
||||
@@ -188,7 +188,7 @@ static void flip_page(void)
|
||||
|
||||
static int draw_slice(uint8_t *src[], int stride[], int w, int h, int x, int y)
|
||||
{
|
||||
sws_scale(sws, src, stride, y, h, map_image, map_stride);
|
||||
sws_scale(sws, (const uint8_t **)src, stride, y, h, map_image, map_stride);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -306,12 +306,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,
|
||||
uint32_t d_height, uint32_t flags, char *title,
|
||||
uint32_t format)
|
||||
{
|
||||
// int screen;
|
||||
|
||||
// int interval, prefer_blank, allow_exp, nothing;
|
||||
unsigned int fg, bg;
|
||||
Colormap theCmap;
|
||||
XSetWindowAttributes xswa;
|
||||
unsigned long xswamask;
|
||||
const struct fmt2Xfmtentry_s *fmte = fmt2Xfmt;
|
||||
|
||||
@@ -358,22 +353,13 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,
|
||||
vo_vm_switch();
|
||||
}
|
||||
#endif
|
||||
bg = WhitePixel(mDisplay, mScreen);
|
||||
fg = BlackPixel(mDisplay, mScreen);
|
||||
|
||||
theCmap = vo_x11_create_colormap(&vinfo);
|
||||
|
||||
xswa.background_pixel = 0;
|
||||
xswa.border_pixel = 0;
|
||||
xswa.colormap = theCmap;
|
||||
xswamask = CWBackPixel | CWBorderPixel | CWColormap;
|
||||
|
||||
#ifdef CONFIG_XF86VM
|
||||
if (vm)
|
||||
{
|
||||
xswa.override_redirect = True;
|
||||
xswamask |= CWOverrideRedirect;
|
||||
}
|
||||
#endif
|
||||
|
||||
vo_x11_create_vo_window(&vinfo, vo_dx, vo_dy, vo_dwidth, vo_dheight,
|
||||
@@ -553,7 +539,7 @@ static int draw_slice(uint8_t * src[], int stride[], int w, int h,
|
||||
dst[0] += dstStride[0] * (image_height - 1);
|
||||
dstStride[0] = -dstStride[0];
|
||||
}
|
||||
sws_scale(swsContext, src, stride, y, h, dst, dstStride);
|
||||
sws_scale(swsContext, (const uint8_t **)src, stride, y, h, dst, dstStride);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -527,7 +527,7 @@ static uint32_t draw_image(struct vo *vo, mp_image_t *mpi)
|
||||
|
||||
if (mpi->flags & MP_IMGFLAG_DIRECT)
|
||||
// direct rendering:
|
||||
ctx->current_buf = (int) (mpi->priv); // hack!
|
||||
ctx->current_buf = (size_t)(mpi->priv); // hack!
|
||||
else if (mpi->flags & MP_IMGFLAG_DRAW_CALLBACK)
|
||||
; // done
|
||||
else if (mpi->flags & MP_IMGFLAG_PLANAR)
|
||||
@@ -603,7 +603,7 @@ static uint32_t get_image(struct xvctx *ctx, mp_image_t *mpi)
|
||||
}
|
||||
}
|
||||
mpi->flags |= MP_IMGFLAG_DIRECT;
|
||||
mpi->priv = (void *) ctx->current_buf;
|
||||
mpi->priv = (void *)(size_t)ctx->current_buf;
|
||||
return VO_TRUE;
|
||||
}
|
||||
return VO_FALSE;
|
||||
|
||||
@@ -1954,9 +1954,10 @@ const m_option_type_t m_option_type_obj_settings_list = {
|
||||
static int parse_obj_presets(const m_option_t* opt,const char *name,
|
||||
const char *param, void* dst, int src) {
|
||||
m_obj_presets_t* obj_p = (m_obj_presets_t*)opt->priv;
|
||||
m_struct_t *in_desc,*out_desc;
|
||||
const m_struct_t *in_desc;
|
||||
const m_struct_t *out_desc;
|
||||
int s,i;
|
||||
unsigned char* pre;
|
||||
const unsigned char *pre;
|
||||
char* pre_name = NULL;
|
||||
|
||||
if(!obj_p) {
|
||||
|
||||
@@ -125,11 +125,11 @@ extern const m_option_type_t m_option_type_obj_settings_list;
|
||||
/// Extra definition needed for \ref m_option_type_obj_presets options.
|
||||
typedef struct {
|
||||
/// Description of the struct holding the presets.
|
||||
struct m_struct_st* in_desc;
|
||||
const struct m_struct_st *in_desc;
|
||||
/// Description of the struct that should be set by the presets.
|
||||
struct m_struct_st* out_desc;
|
||||
const struct m_struct_st *out_desc;
|
||||
/// Pointer to an array of structs defining the various presets.
|
||||
void* presets;
|
||||
const void *presets;
|
||||
/// Offset of the preset's name inside the in_struct.
|
||||
void* name_off;
|
||||
} m_obj_presets_t;
|
||||
|
||||
2
mp_msg.c
2
mp_msg.c
@@ -71,7 +71,7 @@ const char* filename_recode(const char* filename)
|
||||
filename_len = strlen(filename);
|
||||
max_path = MSGSIZE_MAX - 4;
|
||||
precoded = recoded_filename;
|
||||
if (iconv(inv_msgiconv, &filename, &filename_len,
|
||||
if (iconv(inv_msgiconv, (char **)&filename, &filename_len,
|
||||
&precoded, &max_path) == (size_t)(-1) && errno == E2BIG) {
|
||||
precoded[0] = precoded[1] = precoded[2] = '.';
|
||||
precoded += 3;
|
||||
|
||||
@@ -274,7 +274,6 @@ play_tree_set_parent(play_tree_t* pt, play_tree_t* parent) {
|
||||
void
|
||||
play_tree_add_file(play_tree_t* pt,char* file) {
|
||||
int n = 0;
|
||||
char* e;
|
||||
|
||||
#ifdef MP_DEBUG
|
||||
assert(pt != NULL);
|
||||
@@ -296,7 +295,7 @@ play_tree_add_file(play_tree_t* pt,char* file) {
|
||||
return;
|
||||
}
|
||||
|
||||
e = pt->files[n] = strdup(file);
|
||||
pt->files[n] = strdup(file);
|
||||
pt->files[n+1] = NULL;
|
||||
|
||||
pt->entry_type = PLAY_TREE_ENTRY_FILE;
|
||||
|
||||
@@ -521,7 +521,7 @@ int asf_mmst_streaming_start(stream_t *stream)
|
||||
char data[BUF_SIZE];
|
||||
uint8_t asf_header[HDR_BUF_SIZE];
|
||||
int asf_header_len;
|
||||
int len, i, packet_length;
|
||||
int i, packet_length;
|
||||
char *path, *unescpath;
|
||||
URL_t *url1 = stream->streaming_ctrl->url;
|
||||
int s = stream->fd;
|
||||
@@ -574,7 +574,7 @@ int asf_mmst_streaming_start(stream_t *stream)
|
||||
// send_command(s, commandno ....)
|
||||
send_command (s, 1, 0, 0x0004000b, strlen(str)*2+2, data);
|
||||
|
||||
len = recv (s, data, BUF_SIZE, 0) ;
|
||||
recv (s, data, BUF_SIZE, 0) ;
|
||||
|
||||
/*This sends details of the local machine IP address to a Funnel system at the server.
|
||||
* Also, the TCP or UDP transport selection is sent.
|
||||
@@ -588,7 +588,7 @@ int asf_mmst_streaming_start(stream_t *stream)
|
||||
memset (data, 0, 8);
|
||||
send_command (s, 2, 0, 0, 24*2+10, data);
|
||||
|
||||
len = recv (s, data, BUF_SIZE, 0) ;
|
||||
recv (s, data, BUF_SIZE, 0) ;
|
||||
|
||||
/* This command sends file path (at server) and file name request to the server.
|
||||
* 0x5 */
|
||||
|
||||
@@ -325,7 +325,7 @@ static int tune_it(int fd_frontend, int fd_sec, unsigned int freq, unsigned int
|
||||
fe_transmit_mode_t TransmissionMode, fe_guard_interval_t guardInterval, fe_bandwidth_t bandwidth,
|
||||
fe_code_rate_t LP_CodeRate, fe_hierarchy_t hier, int timeout)
|
||||
{
|
||||
int res, hi_lo, dfd;
|
||||
int res, hi_lo = 0, dfd;
|
||||
struct dvb_frontend_parameters feparams;
|
||||
struct dvb_frontend_info fe_info;
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ fsdp_parse (const char *text_description, fsdp_description_t * dsc)
|
||||
{
|
||||
fsdp_error_t result;
|
||||
const char *p = text_description, *p2;
|
||||
unsigned int index, j;
|
||||
unsigned int j;
|
||||
/* temps for sscanf */
|
||||
const unsigned int TEMPCHARS = 6;
|
||||
char fsdp_buf[TEMPCHARS][MAXSHORTFIELDLEN];
|
||||
@@ -252,7 +252,6 @@ fsdp_parse (const char *text_description, fsdp_description_t * dsc)
|
||||
return FSDPE_MISSING_TIME;
|
||||
dsc->time_periods = calloc (dsc->time_periods_count,
|
||||
sizeof (fsdp_time_period_t *));
|
||||
index = 0;
|
||||
for (j = 0; j < dsc->time_periods_count; j++)
|
||||
{
|
||||
unsigned int h = 0;
|
||||
@@ -290,11 +289,6 @@ fsdp_parse (const char *text_description, fsdp_description_t * dsc)
|
||||
calloc (h, sizeof (fsdp_repeat_t *));
|
||||
for (h = 0; h < dsc->time_periods[j]->repeats_count; h++)
|
||||
{
|
||||
/*
|
||||
get_repeat_values(p,&(dsc->time_periods[index].repeats[index2]));
|
||||
fsdp_error_t get_repeat_values (const char *r, fsdp_repeat_t
|
||||
*repeat);
|
||||
*/
|
||||
if (sscanf (p, "r=%10s %10s %" MLFLENS "[^\r\n]",
|
||||
fsdp_buf[0], fsdp_buf[1], longfsdp_buf) == 3)
|
||||
{
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
|
||||
#include "config.h"
|
||||
#include "libavutil/common.h"
|
||||
#include "libavutil/attributes.h"
|
||||
#include "real.h"
|
||||
#include "asmrp.h"
|
||||
#include "sdpplin.h"
|
||||
@@ -316,7 +317,7 @@ int real_get_rdt_chunk(rtsp_t *rtsp_session, char **buffer, int rdt_rawdata) {
|
||||
rmff_pheader_t ph;
|
||||
int size;
|
||||
int flags1, flags2;
|
||||
int unknown1;
|
||||
int unknown1 av_unused;
|
||||
uint32_t ts;
|
||||
static uint32_t prev_ts = -1;
|
||||
static int prev_stream_number = -1;
|
||||
|
||||
@@ -165,7 +165,7 @@ static stream_t *open_stream_plugin(const stream_info_t *sinfo,
|
||||
arg = m_struct_alloc(desc);
|
||||
if(sinfo->opts_url) {
|
||||
m_option_t url_opt =
|
||||
{ "stream url", arg , CONF_TYPE_CUSTOM_URL, 0, 0 ,0, sinfo->opts };
|
||||
{ "stream url", arg , CONF_TYPE_CUSTOM_URL, 0, 0 ,0, (void *)sinfo->opts };
|
||||
if(m_option_parse(&url_opt,"stream url",filename,arg,M_CONFIG_FILE) < 0) {
|
||||
mp_msg(MSGT_OPEN,MSGL_ERR, "URL parsing failed on url %s\n",filename);
|
||||
m_struct_free(desc,arg);
|
||||
|
||||
@@ -95,9 +95,9 @@ static const m_option_t cdda_params_fields[] = {
|
||||
{ "noskip", ST_OFF(no_skip), CONF_TYPE_FLAG, 0 , 0, 1, NULL },
|
||||
{ "skip", ST_OFF(no_skip), CONF_TYPE_FLAG, 0 , 1, 0, NULL },
|
||||
{ "device", ST_OFF(device), CONF_TYPE_STRING, 0, 0, 0, NULL },
|
||||
{ "span", ST_OFF(span), CONF_TYPE_OBJ_PARAMS, 0, 0, 0, &m_span_params_def },
|
||||
{ "span", ST_OFF(span), CONF_TYPE_OBJ_PARAMS, 0, 0, 0, (void *)&m_span_params_def },
|
||||
/// For url parsing
|
||||
{ "hostname", ST_OFF(span), CONF_TYPE_OBJ_PARAMS, 0, 0, 0, &m_span_params_def },
|
||||
{ "hostname", ST_OFF(span), CONF_TYPE_OBJ_PARAMS, 0, 0, 0, (void *)&m_span_params_def },
|
||||
{ "port", ST_OFF(speed), CONF_TYPE_INT, M_OPT_RANGE,1,100, NULL },
|
||||
{ "filename", ST_OFF(device), CONF_TYPE_STRING, 0, 0, 0, NULL },
|
||||
{NULL, NULL, 0, 0, 0, 0, NULL}
|
||||
@@ -121,7 +121,7 @@ const m_option_t cdda_opts[] = {
|
||||
{ "noskip", &cdda_dflts.no_skip, CONF_TYPE_FLAG, 0 , 0, 1, NULL },
|
||||
{ "skip", &cdda_dflts.no_skip, CONF_TYPE_FLAG, 0 , 1, 0, NULL },
|
||||
{ "device", &cdda_dflts.device, CONF_TYPE_STRING, 0, 0, 0, NULL },
|
||||
{ "span", &cdda_dflts.span, CONF_TYPE_OBJ_PARAMS, 0, 0, 0, &m_span_params_def },
|
||||
{ "span", &cdda_dflts.span, CONF_TYPE_OBJ_PARAMS, 0, 0, 0, (void *)&m_span_params_def },
|
||||
{NULL, NULL, 0, 0, 0, 0, NULL}
|
||||
};
|
||||
|
||||
|
||||
@@ -264,8 +264,10 @@ static int norm_from_string(tvi_handle_t *tvh, char* norm)
|
||||
str[sizeof(str)-1] = '\0';
|
||||
ret=funcs->control(tvh->priv, TVI_CONTROL_SPC_GET_NORMID, str);
|
||||
|
||||
if(ret==TVI_CONTROL_TRUE)
|
||||
return *(int *)str;
|
||||
if (ret == TVI_CONTROL_TRUE) {
|
||||
int *v = (int *)str;
|
||||
return *v;
|
||||
}
|
||||
|
||||
if(ret!=TVI_CONTROL_UNKNOWN)
|
||||
{
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
|
||||
#include "font_load.h"
|
||||
#include "mp_msg.h"
|
||||
#include "libavutil/attributes.h"
|
||||
|
||||
raw_file* load_raw(char *name,int verbose){
|
||||
int bpp;
|
||||
@@ -76,7 +77,7 @@ char section[64];
|
||||
int i,j;
|
||||
int chardb=0;
|
||||
int fontdb=-1;
|
||||
int version=0;
|
||||
int version av_unused;
|
||||
int first=1;
|
||||
|
||||
desc=malloc(sizeof(font_desc_t));if(!desc) goto fail_out;
|
||||
|
||||
@@ -131,8 +131,9 @@ static void paste_bitmap(unsigned char *bbuffer, FT_Bitmap *bitmap, int x, int y
|
||||
|
||||
|
||||
static int check_font(font_desc_t *desc, float ppem, int padding, int pic_idx,
|
||||
int charset_size, FT_ULong *charset, FT_ULong *charcodes,
|
||||
int unicode) {
|
||||
int charset_size, const FT_ULong *charset,
|
||||
const FT_ULong *charcodes, int unicode)
|
||||
{
|
||||
FT_Error error;
|
||||
FT_Face face = desc->faces[pic_idx];
|
||||
int const load_flags = FT_LOAD_DEFAULT;
|
||||
@@ -611,9 +612,10 @@ void render_one_glyph(font_desc_t *desc, int c)
|
||||
}
|
||||
|
||||
|
||||
static int prepare_font(font_desc_t *desc, FT_Face face, float ppem, int pic_idx,
|
||||
int charset_size, FT_ULong *charset, FT_ULong *charcodes, int unicode,
|
||||
double thickness, double radius)
|
||||
static int prepare_font(font_desc_t *desc, FT_Face face, float ppem,
|
||||
int pic_idx, int charset_size,
|
||||
const FT_ULong *charset, const FT_ULong *charcodes,
|
||||
int unicode, double thickness, double radius)
|
||||
{
|
||||
int i, err;
|
||||
int padding = ceil(radius) + ceil(thickness);
|
||||
|
||||
@@ -872,7 +872,7 @@ static void sws_spu_image(unsigned char *d1, unsigned char *d2, int dw, int dh,
|
||||
ctx=sws_getContext(sw, sh, PIX_FMT_GRAY8, dw, dh, PIX_FMT_GRAY8, SWS_GAUSS, &filter, NULL, NULL);
|
||||
sws_scale(ctx,&s1,&ss,0,sh,&d1,&ds);
|
||||
for (i=ss*sh-1; i>=0; i--) if (!s2[i]) s2[i] = 255; //else s2[i] = 1;
|
||||
sws_scale(ctx,&s2,&ss,0,sh,&d2,&ds);
|
||||
sws_scale(ctx,(const uint8_t **)&s2,&ss,0,sh,&d2,&ds);
|
||||
for (i=ds*dh-1; i>=0; i--) if (d2[i]==0) d2[i] = 1; else if (d2[i]==255) d2[i] = 0;
|
||||
sws_freeContext(ctx);
|
||||
}
|
||||
|
||||
@@ -673,7 +673,6 @@ inline static void vo_update_text_sub(struct osd_state *osd, mp_osd_obj_t* obj,i
|
||||
unsigned char *t;
|
||||
int c,i,j,l,x,y,font,prevc,counter;
|
||||
int k;
|
||||
int lastStripPosition;
|
||||
int xsize;
|
||||
int xmin=dxs,xmax=0;
|
||||
int h,lasth;
|
||||
@@ -693,12 +692,11 @@ inline static void vo_update_text_sub(struct osd_state *osd, mp_osd_obj_t* obj,i
|
||||
// too long lines divide into a smaller ones
|
||||
i=k=lasth=0;
|
||||
h=sub_font->height;
|
||||
lastStripPosition=-1;
|
||||
l=vo_sub->lines;
|
||||
|
||||
{
|
||||
struct osd_text_t *osl, *cp_ott, *tmp_ott, *tmp;
|
||||
struct osd_text_p *otp_sub = NULL, *otp_sub_tmp, // these are used to store the whole sub text osd
|
||||
struct osd_text_p *otp_sub = NULL, *otp_sub_tmp = NULL, // these are used to store the whole sub text osd
|
||||
*otp, *tmp_otp, *pmt; // these are used to manage sub text osd coming from a single sub line
|
||||
int *char_seq, char_position, xlimit = dxs * sub_width_p / 100, counter;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user