mirror of
https://github.com/mpv-player/mpv
synced 2024-12-30 02:52:10 +00:00
Merge branch 'mplayer1_changes'
This commit is contained in:
commit
a77e5f07ed
@ -178,21 +178,21 @@ See the \-input option for ways to customize it.
|
||||
.B keyboard control
|
||||
.PD 0
|
||||
.RS
|
||||
.IPs "<\- and \->"
|
||||
.IPs "LEFT and RIGHT"
|
||||
Seek backward/\:forward 10 seconds.
|
||||
Shift+arrow does a 1 second exact seek (see \-hr\-seek; currently modifier
|
||||
keys like shift only work if used in an X output window).
|
||||
.IPs "up and down"
|
||||
.IPs "UP and DOWN"
|
||||
Seek forward/\:backward 1 minute.
|
||||
Shift+arrow does a 5 second exact seek (see \-hr\-seek; currently modifier
|
||||
keys like shift only work if used in an X output window).
|
||||
.IPs "pgup and pgdown"
|
||||
.IPs "PGUP and PGDWN"
|
||||
Seek forward/\:backward 10 minutes.
|
||||
.IPs "[ and ]"
|
||||
Decrease/increase current playback speed by 10%.
|
||||
.IPs "{ and }"
|
||||
Halve/double current playback speed.
|
||||
.IPs "backspace"
|
||||
.IPs "BACKSPACE"
|
||||
Reset playback speed to normal.
|
||||
.IPs "< and >"
|
||||
Go backward/\:forward in the playlist.
|
||||
|
@ -49,6 +49,7 @@
|
||||
#include "libmpcodecs/dec_video.h"
|
||||
#include "libmpcodecs/dec_audio.h"
|
||||
#include "libmpcodecs/dec_teletext.h"
|
||||
#include "osdep/strsep.h"
|
||||
#include "sub/vobsub.h"
|
||||
#include "sub/spudec.h"
|
||||
#include "path.h"
|
||||
|
15
configure
vendored
15
configure
vendored
@ -3445,7 +3445,8 @@ echores "$_vsscanf"
|
||||
|
||||
echocheck "swab()"
|
||||
_swab=no
|
||||
define_statement_check "_XOPEN_SOURCE 600" "unistd.h" 'int a, b; swab(&a, &b, 0)' && _swab=yes
|
||||
define_statement_check "_XOPEN_SOURCE 600" "unistd.h" 'int a, b; swab(&a, &b, 0)' ||
|
||||
statement_check "string.h" 'int a, b; swab(&a, &b, 0)' && _swab=yes
|
||||
if test "$_swab" = yes ; then
|
||||
def_swab='#define HAVE_SWAB 1'
|
||||
need_swab=no
|
||||
@ -3849,8 +3850,6 @@ else
|
||||
def_x11='#undef CONFIG_X11'
|
||||
novomodules="x11 $novomodules"
|
||||
res_comment="check if the dev(el) packages are installed"
|
||||
# disable stuff that depends on X
|
||||
_xv=no ; _xinerama=no ; _vm=no ; _xf86keysym=no ; _vdpau=no
|
||||
fi
|
||||
echores "$_x11"
|
||||
|
||||
@ -3898,7 +3897,7 @@ fi
|
||||
|
||||
|
||||
echocheck "Xv"
|
||||
if test "$_xv" = auto ; then
|
||||
if test "$_xv" = auto && test "$_x11" = yes ; then
|
||||
_xv=no
|
||||
statement_check_broken X11/Xlib.h X11/extensions/Xvlib.h 'XvGetPortAttribute(0, 0, 0, 0)' -lXv && _xv=yes
|
||||
fi
|
||||
@ -3915,7 +3914,7 @@ echores "$_xv"
|
||||
|
||||
|
||||
echocheck "VDPAU"
|
||||
if test "$_vdpau" = auto ; then
|
||||
if test "$_vdpau" = auto && test "$_x11" = yes ; then
|
||||
_vdpau=no
|
||||
if test "$_dl" = yes ; then
|
||||
return_statement_check vdpau/vdpau_x11.h 'vdp_device_create_x11(0, 0, 0, 0)' VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L1 -lvdpau && _vdpau=yes
|
||||
@ -3933,7 +3932,7 @@ echores "$_vdpau"
|
||||
|
||||
|
||||
echocheck "Xinerama"
|
||||
if test "$_xinerama" = auto ; then
|
||||
if test "$_xinerama" = auto && test "$_x11" = yes ; then
|
||||
_xinerama=no
|
||||
statement_check X11/extensions/Xinerama.h 'XineramaIsActive(0)' -lXinerama && _xinerama=yes
|
||||
fi
|
||||
@ -3953,7 +3952,7 @@ echores "$_xinerama"
|
||||
# This check may be useful for future mplayer versions (to change resolution)
|
||||
# If you run into problems, remove '-lXxf86vm'.
|
||||
echocheck "Xxf86vm"
|
||||
if test "$_vm" = auto ; then
|
||||
if test "$_vm" = auto && test "$_x11" = yes ; then
|
||||
_vm=no
|
||||
statement_check_broken X11/Xlib.h X11/extensions/xf86vmode.h 'XF86VidModeQueryExtension(0, 0, 0)' -lXxf86vm && _vm=yes
|
||||
fi
|
||||
@ -3970,7 +3969,7 @@ echores "$_vm"
|
||||
# has nothing to do with xf86vm and XFree 3.x has xf86vm but does NOT
|
||||
# have these new keycodes.
|
||||
echocheck "XF86keysym"
|
||||
if test "$_xf86keysym" = auto; then
|
||||
if test "$_xf86keysym" = auto && test "$_x11" = yes ; then
|
||||
_xf86keysym=no
|
||||
return_check X11/XF86keysym.h XF86XK_AudioPause && _xf86keysym=yes
|
||||
fi
|
||||
|
@ -150,6 +150,13 @@ videocodec ffr210
|
||||
driver ffmpeg
|
||||
dll "r210"
|
||||
|
||||
videocodec ffr10k
|
||||
info "FFmpeg R10k - 10-bit RGB"
|
||||
status working
|
||||
fourcc R10k,R10g
|
||||
driver ffmpeg
|
||||
dll "r10k"
|
||||
|
||||
videocodec blackmagic
|
||||
info "Blackmagic 10-bit"
|
||||
status working
|
||||
@ -3236,6 +3243,7 @@ videocodec rawyuy2
|
||||
fourcc YUNV YUY2
|
||||
fourcc VYUY YUY2
|
||||
fourcc yuvs YUY2
|
||||
fourcc DVOO YUY2
|
||||
out YUY2
|
||||
|
||||
videocodec rawyuv2
|
||||
@ -3359,6 +3367,7 @@ videocodec ffrawyuy2
|
||||
fourcc YUNV,yunv
|
||||
fourcc VYUY,vyuy
|
||||
fourcc yuvs,YUVS
|
||||
fourcc DVOO
|
||||
driver ffmpeg
|
||||
dll rawvideo
|
||||
|
||||
@ -4379,6 +4388,13 @@ audiocodec ffpcmlxf
|
||||
driver ffmpeg
|
||||
dll pcm_lxf
|
||||
|
||||
audiocodec ffs302m
|
||||
info "SMPTE 302M"
|
||||
status working
|
||||
fourcc BSSD
|
||||
driver ffmpeg
|
||||
dll s302m
|
||||
|
||||
; add every new fourcc also to allocate_parser()
|
||||
; in libmpdemux/demuxer.c
|
||||
audiocodec ffac3
|
||||
|
@ -277,6 +277,16 @@ static const mp_key_name_t key_names[] = {
|
||||
{ MOUSE_BTN7, "MOUSE_BTN7" },
|
||||
{ MOUSE_BTN8, "MOUSE_BTN8" },
|
||||
{ MOUSE_BTN9, "MOUSE_BTN9" },
|
||||
{ MOUSE_BTN10, "MOUSE_BTN10" },
|
||||
{ MOUSE_BTN11, "MOUSE_BTN11" },
|
||||
{ MOUSE_BTN12, "MOUSE_BTN12" },
|
||||
{ MOUSE_BTN13, "MOUSE_BTN13" },
|
||||
{ MOUSE_BTN14, "MOUSE_BTN14" },
|
||||
{ MOUSE_BTN15, "MOUSE_BTN15" },
|
||||
{ MOUSE_BTN16, "MOUSE_BTN16" },
|
||||
{ MOUSE_BTN17, "MOUSE_BTN17" },
|
||||
{ MOUSE_BTN18, "MOUSE_BTN18" },
|
||||
{ MOUSE_BTN19, "MOUSE_BTN19" },
|
||||
{ MOUSE_BTN0_DBL, "MOUSE_BTN0_DBL" },
|
||||
{ MOUSE_BTN1_DBL, "MOUSE_BTN1_DBL" },
|
||||
{ MOUSE_BTN2_DBL, "MOUSE_BTN2_DBL" },
|
||||
@ -287,6 +297,16 @@ static const mp_key_name_t key_names[] = {
|
||||
{ MOUSE_BTN7_DBL, "MOUSE_BTN7_DBL" },
|
||||
{ MOUSE_BTN8_DBL, "MOUSE_BTN8_DBL" },
|
||||
{ MOUSE_BTN9_DBL, "MOUSE_BTN9_DBL" },
|
||||
{ MOUSE_BTN10_DBL, "MOUSE_BTN10_DBL" },
|
||||
{ MOUSE_BTN11_DBL, "MOUSE_BTN11_DBL" },
|
||||
{ MOUSE_BTN12_DBL, "MOUSE_BTN12_DBL" },
|
||||
{ MOUSE_BTN13_DBL, "MOUSE_BTN13_DBL" },
|
||||
{ MOUSE_BTN14_DBL, "MOUSE_BTN14_DBL" },
|
||||
{ MOUSE_BTN15_DBL, "MOUSE_BTN15_DBL" },
|
||||
{ MOUSE_BTN16_DBL, "MOUSE_BTN16_DBL" },
|
||||
{ MOUSE_BTN17_DBL, "MOUSE_BTN17_DBL" },
|
||||
{ MOUSE_BTN18_DBL, "MOUSE_BTN18_DBL" },
|
||||
{ MOUSE_BTN19_DBL, "MOUSE_BTN19_DBL" },
|
||||
{ JOY_AXIS1_MINUS, "JOY_UP" },
|
||||
{ JOY_AXIS1_PLUS, "JOY_DOWN" },
|
||||
{ JOY_AXIS0_MINUS, "JOY_LEFT" },
|
||||
|
@ -140,7 +140,17 @@
|
||||
#define MOUSE_BTN7 (MOUSE_BASE+7)
|
||||
#define MOUSE_BTN8 (MOUSE_BASE+8)
|
||||
#define MOUSE_BTN9 (MOUSE_BASE+9)
|
||||
#define MOUSE_BTN_END (MOUSE_BASE+10)
|
||||
#define MOUSE_BTN10 (MOUSE_BASE+10)
|
||||
#define MOUSE_BTN11 (MOUSE_BASE+11)
|
||||
#define MOUSE_BTN12 (MOUSE_BASE+12)
|
||||
#define MOUSE_BTN13 (MOUSE_BASE+13)
|
||||
#define MOUSE_BTN14 (MOUSE_BASE+14)
|
||||
#define MOUSE_BTN15 (MOUSE_BASE+15)
|
||||
#define MOUSE_BTN16 (MOUSE_BASE+16)
|
||||
#define MOUSE_BTN17 (MOUSE_BASE+17)
|
||||
#define MOUSE_BTN18 (MOUSE_BASE+18)
|
||||
#define MOUSE_BTN19 (MOUSE_BASE+19)
|
||||
#define MOUSE_BTN_END (MOUSE_BASE+20)
|
||||
|
||||
#define MOUSE_BASE_DBL (0x300|MP_NO_REPEAT_KEY)
|
||||
#define MOUSE_BTN0_DBL (MOUSE_BASE_DBL+0)
|
||||
@ -153,7 +163,17 @@
|
||||
#define MOUSE_BTN7_DBL (MOUSE_BASE_DBL+7)
|
||||
#define MOUSE_BTN8_DBL (MOUSE_BASE_DBL+8)
|
||||
#define MOUSE_BTN9_DBL (MOUSE_BASE_DBL+9)
|
||||
#define MOUSE_BTN_DBL_END (MOUSE_BASE_DBL+10)
|
||||
#define MOUSE_BTN10_DBL (MOUSE_BASE_DBL+10)
|
||||
#define MOUSE_BTN11_DBL (MOUSE_BASE_DBL+11)
|
||||
#define MOUSE_BTN12_DBL (MOUSE_BASE_DBL+12)
|
||||
#define MOUSE_BTN13_DBL (MOUSE_BASE_DBL+13)
|
||||
#define MOUSE_BTN14_DBL (MOUSE_BASE_DBL+14)
|
||||
#define MOUSE_BTN15_DBL (MOUSE_BASE_DBL+15)
|
||||
#define MOUSE_BTN16_DBL (MOUSE_BASE_DBL+16)
|
||||
#define MOUSE_BTN17_DBL (MOUSE_BASE_DBL+17)
|
||||
#define MOUSE_BTN18_DBL (MOUSE_BASE_DBL+18)
|
||||
#define MOUSE_BTN19_DBL (MOUSE_BASE_DBL+19)
|
||||
#define MOUSE_BTN_DBL_END (MOUSE_BASE_DBL+20)
|
||||
|
||||
|
||||
#endif // AR_DEFINES_ONLY
|
||||
|
@ -37,6 +37,7 @@
|
||||
#ifdef __MINGW32__
|
||||
// for GetFileType to detect pipes
|
||||
#include <windows.h>
|
||||
#include <io.h>
|
||||
#endif
|
||||
|
||||
struct priv {
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include "config.h"
|
||||
#include "img_format.h"
|
||||
#include "stdio.h"
|
||||
#include "mpbswap.h"
|
||||
|
||||
const char *vo_format_name(int format)
|
||||
{
|
||||
@ -117,20 +118,57 @@ const char *vo_format_name(int format)
|
||||
return unknown_format;
|
||||
}
|
||||
|
||||
int mp_get_chroma_shift(int format, int *x_shift, int *y_shift)
|
||||
int mp_get_chroma_shift(int format, int *x_shift, int *y_shift, int *component_bits)
|
||||
{
|
||||
int xs = 0, ys = 0;
|
||||
int bpp;
|
||||
int bpp_factor = 1;
|
||||
int err = 0;
|
||||
switch (format) {
|
||||
case IMGFMT_420P16_LE:
|
||||
case IMGFMT_420P16_BE:
|
||||
case IMGFMT_420P10_LE:
|
||||
case IMGFMT_420P10_BE:
|
||||
case IMGFMT_420P9_LE:
|
||||
case IMGFMT_420P9_BE:
|
||||
bpp_factor = 2;
|
||||
int bits = 8;
|
||||
if ((format & 0xff0000f0) == 0x34000050)
|
||||
format = bswap_32(format);
|
||||
if ((format & 0xf00000ff) == 0x50000034) {
|
||||
switch (format >> 24) {
|
||||
case 0x50:
|
||||
break;
|
||||
case 0x51:
|
||||
bits = 16;
|
||||
break;
|
||||
case 0x52:
|
||||
bits = 10;
|
||||
break;
|
||||
case 0x53:
|
||||
bits = 9;
|
||||
break;
|
||||
default:
|
||||
err = 1;
|
||||
break;
|
||||
}
|
||||
switch (format & 0x00ffffff) {
|
||||
case 0x00343434: // 444
|
||||
xs = 0;
|
||||
ys = 0;
|
||||
break;
|
||||
case 0x00323234: // 422
|
||||
xs = 1;
|
||||
ys = 0;
|
||||
break;
|
||||
case 0x00303234: // 420
|
||||
xs = 1;
|
||||
ys = 1;
|
||||
break;
|
||||
case 0x00313134: // 411
|
||||
xs = 2;
|
||||
ys = 0;
|
||||
break;
|
||||
case 0x00303434: // 440
|
||||
xs = 0;
|
||||
ys = 1;
|
||||
break;
|
||||
default:
|
||||
err = 1;
|
||||
break;
|
||||
}
|
||||
} else switch (format) {
|
||||
case IMGFMT_420A:
|
||||
case IMGFMT_I420:
|
||||
case IMGFMT_IYUV:
|
||||
@ -143,34 +181,6 @@ int mp_get_chroma_shift(int format, int *x_shift, int *y_shift)
|
||||
xs = 2;
|
||||
ys = 2;
|
||||
break;
|
||||
case IMGFMT_444P16_LE:
|
||||
case IMGFMT_444P16_BE:
|
||||
case IMGFMT_444P10_LE:
|
||||
case IMGFMT_444P10_BE:
|
||||
case IMGFMT_444P9_LE:
|
||||
case IMGFMT_444P9_BE:
|
||||
bpp_factor = 2;
|
||||
case IMGFMT_444P:
|
||||
xs = 0;
|
||||
ys = 0;
|
||||
break;
|
||||
case IMGFMT_422P16_LE:
|
||||
case IMGFMT_422P16_BE:
|
||||
case IMGFMT_422P10_LE:
|
||||
case IMGFMT_422P10_BE:
|
||||
bpp_factor = 2;
|
||||
case IMGFMT_422P:
|
||||
xs = 1;
|
||||
ys = 0;
|
||||
break;
|
||||
case IMGFMT_411P:
|
||||
xs = 2;
|
||||
ys = 0;
|
||||
break;
|
||||
case IMGFMT_440P:
|
||||
xs = 0;
|
||||
ys = 1;
|
||||
break;
|
||||
case IMGFMT_Y8:
|
||||
case IMGFMT_Y800:
|
||||
xs = 31;
|
||||
@ -182,9 +192,10 @@ int mp_get_chroma_shift(int format, int *x_shift, int *y_shift)
|
||||
}
|
||||
if (x_shift) *x_shift = xs;
|
||||
if (y_shift) *y_shift = ys;
|
||||
if (component_bits) *component_bits = bits;
|
||||
bpp = 8 + ((16 >> xs) >> ys);
|
||||
if (format == IMGFMT_420A)
|
||||
bpp += 8;
|
||||
bpp *= bpp_factor;
|
||||
bpp *= (bits + 7) >> 3;
|
||||
return err ? 0 : bpp;
|
||||
}
|
||||
|
@ -227,8 +227,9 @@ const char *vo_format_name(int format);
|
||||
/**
|
||||
* Calculates the scale shifts for the chroma planes for planar YUV
|
||||
*
|
||||
* \param component_bits bits per component
|
||||
* \return bits-per-pixel for format if successful (i.e. format is 3 or 4-planes planar YUV), 0 otherwise
|
||||
*/
|
||||
int mp_get_chroma_shift(int format, int *x_shift, int *y_shift);
|
||||
int mp_get_chroma_shift(int format, int *x_shift, int *y_shift, int *component_bits);
|
||||
|
||||
#endif /* MPLAYER_IMG_FORMAT_H */
|
||||
|
@ -123,9 +123,9 @@ void mp_image_setfmt(mp_image_t* mpi,unsigned int out_fmt){
|
||||
}
|
||||
mpi->flags|=MP_IMGFLAG_YUV;
|
||||
mpi->num_planes=3;
|
||||
if (mp_get_chroma_shift(out_fmt, NULL, NULL)) {
|
||||
if (mp_get_chroma_shift(out_fmt, NULL, NULL, NULL)) {
|
||||
mpi->flags|=MP_IMGFLAG_PLANAR;
|
||||
mpi->bpp = mp_get_chroma_shift(out_fmt, &mpi->chroma_x_shift, &mpi->chroma_y_shift);
|
||||
mpi->bpp = mp_get_chroma_shift(out_fmt, &mpi->chroma_x_shift, &mpi->chroma_y_shift, NULL);
|
||||
mpi->chroma_width = mpi->width >> mpi->chroma_x_shift;
|
||||
mpi->chroma_height = mpi->height >> mpi->chroma_y_shift;
|
||||
}
|
||||
|
@ -389,7 +389,7 @@ static void uninit(sh_video_t *sh){
|
||||
vd_ffmpeg_ctx *ctx = sh->context;
|
||||
AVCodecContext *avctx = ctx->avctx;
|
||||
|
||||
if(sh->opts->lavc_param.vstats){
|
||||
if (sh->opts->lavc_param.vstats && avctx->coded_frame) {
|
||||
int i;
|
||||
for(i=1; i<32; i++){
|
||||
mp_msg(MSGT_DECVIDEO, MSGL_INFO, "QP: %d, count: %d\n", i, ctx->qp_stat[i]);
|
||||
@ -784,6 +784,9 @@ static struct mp_image *decode(struct sh_video *sh, void *data, int len,
|
||||
AVFrame *pic= avctx->coded_frame;
|
||||
double quality=0.0;
|
||||
|
||||
if (!pic)
|
||||
break;
|
||||
|
||||
if(!fvstats) {
|
||||
time_t today2;
|
||||
struct tm *today;
|
||||
|
@ -116,7 +116,7 @@ static int config(struct vf_instance *vf,
|
||||
//__asm__ volatile("emms\n\t");
|
||||
allocStuff(&vf->priv->luma, width, height);
|
||||
|
||||
mp_get_chroma_shift(outfmt, &sw, &sh);
|
||||
mp_get_chroma_shift(outfmt, &sw, &sh, NULL);
|
||||
allocStuff(&vf->priv->chroma, width>>sw, height>>sh);
|
||||
|
||||
return vf_next_config(vf,width,height,d_width,d_height,flags,outfmt);
|
||||
|
@ -76,7 +76,7 @@ static int config(struct vf_instance *vf,
|
||||
|
||||
allocStuff(&vf->priv->luma, width, height);
|
||||
|
||||
mp_get_chroma_shift(outfmt, &sw, &sh);
|
||||
mp_get_chroma_shift(outfmt, &sw, &sh, NULL);
|
||||
allocStuff(&vf->priv->chroma, width>>sw, height>>sh);
|
||||
|
||||
return vf_next_config(vf,width,height,d_width,d_height,flags,outfmt);
|
||||
|
@ -258,7 +258,7 @@ while(1){
|
||||
s->aIndex[i].dwSize = stream_read_dword_le(demuxer->stream);
|
||||
s->aIndex[i].dwDuration = stream_read_dword_le(demuxer->stream);
|
||||
mp_msg (MSGT_HEADER, MSGL_V, "ODML (%.4s): [%d] 0x%016"PRIx64" 0x%04x %u\n",
|
||||
(s->dwChunkId), i,
|
||||
s->dwChunkId, i,
|
||||
(uint64_t)s->aIndex[i].qwOffset, s->aIndex[i].dwSize, s->aIndex[i].dwDuration);
|
||||
}
|
||||
|
||||
|
@ -80,6 +80,7 @@ typedef enum
|
||||
AUDIO_AAC = mmioFOURCC('M', 'P', '4', 'A'),
|
||||
AUDIO_AAC_LATM = mmioFOURCC('M', 'P', '4', 'L'),
|
||||
AUDIO_TRUEHD = mmioFOURCC('T', 'R', 'H', 'D'),
|
||||
AUDIO_S302M = mmioFOURCC('B', 'S', 'S', 'D'),
|
||||
SPU_DVD = 0x3000000,
|
||||
SPU_DVB = 0x3000001,
|
||||
SPU_TELETEXT = 0x3000002,
|
||||
@ -260,6 +261,7 @@ static int IS_AUDIO(es_stream_type_t type)
|
||||
case AUDIO_AAC_LATM:
|
||||
case AUDIO_DTS:
|
||||
case AUDIO_TRUEHD:
|
||||
case AUDIO_S302M:
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
@ -661,7 +663,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 av_unused = 0, i, num_packets = 0, req_apid, req_vpid, req_spid;
|
||||
int video_found = 0, audio_found = 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;
|
||||
@ -828,7 +830,6 @@ static off_t ts_detect_streams(demuxer_t *demuxer, tsdemux_init_t *param)
|
||||
{
|
||||
param->stype = es.type;
|
||||
param->spid = es.pid;
|
||||
sub_found = 1;
|
||||
}
|
||||
}
|
||||
|
||||
@ -896,6 +897,8 @@ static off_t ts_detect_streams(demuxer_t *demuxer, tsdemux_init_t *param)
|
||||
mp_msg(MSGT_DEMUXER, MSGL_INFO, "AUDIO AAC LATM(pid=%d)", param->apid);
|
||||
else if(param->atype == AUDIO_TRUEHD)
|
||||
mp_msg(MSGT_DEMUXER, MSGL_INFO, "AUDIO TRUEHD(pid=%d)", param->apid);
|
||||
else if(param->atype == AUDIO_S302M)
|
||||
mp_msg(MSGT_DEMUXER, MSGL_INFO, "AUDIO S302M(pid=%d)", param->apid);
|
||||
else
|
||||
{
|
||||
audio_found = 0;
|
||||
@ -2357,6 +2360,10 @@ static int parse_descriptors(struct pmt_es_t *es, uint8_t *ptr)
|
||||
{
|
||||
es->type = VIDEO_DIRAC;
|
||||
}
|
||||
else if(d[0] == 'B' && d[1] == 'S' && d[2] == 'S' && d[3] == 'D')
|
||||
{
|
||||
es->type = AUDIO_S302M;
|
||||
}
|
||||
else
|
||||
es->type = UNKNOWN;
|
||||
mp_msg(MSGT_DEMUX, MSGL_DBG2, "FORMAT %s\n", es->format_descriptor);
|
||||
|
@ -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 av_unused, height;
|
||||
int height;
|
||||
|
||||
if ((buffer[6] & 0x20) != 0x20){
|
||||
fprintf(stderr, "missing marker bit!\n");
|
||||
@ -54,11 +54,8 @@ int mp_header_process_sequence_header (mp_mpeg_header_t * picture, const unsigne
|
||||
|
||||
height = (buffer[0] << 16) | (buffer[1] << 8) | buffer[2];
|
||||
|
||||
picture->display_picture_width = (height >> 12);
|
||||
picture->display_picture_height = (height & 0xfff);
|
||||
|
||||
width = ((height >> 12) + 15) & ~15;
|
||||
height = ((height & 0xfff) + 15) & ~15;
|
||||
picture->display_picture_width = height >> 12;
|
||||
picture->display_picture_height = height & 0xfff;
|
||||
|
||||
picture->aspect_ratio_information = buffer[3] >> 4;
|
||||
picture->frame_rate_code = buffer[3] & 15;
|
||||
|
@ -183,7 +183,7 @@ static const struct gl_name_map_struct gl_name_map[] = {
|
||||
MAP(GL_R3_G3_B2), MAP(GL_RGB4), MAP(GL_RGB5), MAP(GL_RGB8),
|
||||
MAP(GL_RGB10), MAP(GL_RGB12), MAP(GL_RGB16), MAP(GL_RGBA2),
|
||||
MAP(GL_RGBA4), MAP(GL_RGB5_A1), MAP(GL_RGBA8), MAP(GL_RGB10_A2),
|
||||
MAP(GL_RGBA12), MAP(GL_RGBA16), MAP(GL_LUMINANCE8),
|
||||
MAP(GL_RGBA12), MAP(GL_RGBA16), MAP(GL_LUMINANCE8), MAP(GL_LUMINANCE16),
|
||||
|
||||
// format
|
||||
MAP(GL_RGB), MAP(GL_RGBA), MAP(GL_RED), MAP(GL_GREEN), MAP(GL_BLUE),
|
||||
@ -254,7 +254,7 @@ int glFindFormat(uint32_t fmt, int *bpp, GLint *gl_texfmt,
|
||||
if (!gl_format) gl_format = &dummy2;
|
||||
if (!gl_type) gl_type = &dummy2;
|
||||
|
||||
if (mp_get_chroma_shift(fmt, NULL, NULL)) {
|
||||
if (mp_get_chroma_shift(fmt, NULL, NULL, NULL)) {
|
||||
// reduce the possible cases a bit
|
||||
if (IMGFMT_IS_YUVP16_LE(fmt))
|
||||
fmt = IMGFMT_420P16_LE;
|
||||
@ -282,7 +282,7 @@ int glFindFormat(uint32_t fmt, int *bpp, GLint *gl_texfmt,
|
||||
break;
|
||||
case IMGFMT_420P16:
|
||||
supported = 0; // no native YUV support
|
||||
*gl_texfmt = 1;
|
||||
*gl_texfmt = GL_LUMINANCE16;
|
||||
*bpp = 16;
|
||||
*gl_format = GL_LUMINANCE;
|
||||
*gl_type = GL_UNSIGNED_SHORT;
|
||||
|
@ -266,6 +266,9 @@
|
||||
#ifndef GL_FLOAT_RGB32_NV
|
||||
#define GL_FLOAT_RGB32_NV 0x8889
|
||||
#endif
|
||||
#ifndef GL_LUMINANCE16
|
||||
#define GL_LUMINANCE16 0x8042
|
||||
#endif
|
||||
#ifndef GL_UNPACK_CLIENT_STORAGE_APPLE
|
||||
#define GL_UNPACK_CLIENT_STORAGE_APPLE 0x85B2
|
||||
#endif
|
||||
|
@ -1335,7 +1335,7 @@ draw_image( mp_image_t *mpi )
|
||||
}
|
||||
|
||||
static int
|
||||
set_equalizer( char *data, int value )
|
||||
set_equalizer( const char *data, int value )
|
||||
{
|
||||
DFBResult res;
|
||||
DFBColorAdjustment ca;
|
||||
@ -1375,7 +1375,7 @@ set_equalizer( char *data, int value )
|
||||
}
|
||||
|
||||
static int
|
||||
get_equalizer( char *data, int *value )
|
||||
get_equalizer( const char *data, int *value )
|
||||
{
|
||||
DFBResult res;
|
||||
DFBColorAdjustment ca;
|
||||
|
@ -980,7 +980,7 @@ static void uninit(void)
|
||||
}
|
||||
|
||||
|
||||
static uint32_t directfb_set_video_eq(char *data, int value) //data==name
|
||||
static uint32_t directfb_set_video_eq(const char *data, int value) //data==name
|
||||
{
|
||||
|
||||
DFBColorAdjustment ca;
|
||||
@ -1038,7 +1038,7 @@ if (layer) {
|
||||
|
||||
}
|
||||
|
||||
static uint32_t directfb_get_video_eq(char *data, int *value) // data==name
|
||||
static uint32_t directfb_get_video_eq(const char *data, int *value) // data==name
|
||||
{
|
||||
|
||||
DFBColorAdjustment ca;
|
||||
|
@ -258,7 +258,7 @@ static void update_yuvconv(void) {
|
||||
gl_conversion_params_t params = {gl_target, yuvconvtype,
|
||||
{colorspace, levelconv, bri, cont, hue, sat, rgamma, ggamma, bgamma},
|
||||
texture_width, texture_height, 0, 0, filter_strength};
|
||||
mp_get_chroma_shift(image_format, &xs, &ys);
|
||||
mp_get_chroma_shift(image_format, &xs, &ys, NULL);
|
||||
params.chrom_texw = params.texw >> xs;
|
||||
params.chrom_texh = params.texh >> ys;
|
||||
glSetupYUVConversion(¶ms);
|
||||
@ -568,7 +568,7 @@ static int initGl(uint32_t d_width, uint32_t d_height) {
|
||||
int i;
|
||||
int xs, ys;
|
||||
scale_type = get_scale_type(1);
|
||||
mp_get_chroma_shift(image_format, &xs, &ys);
|
||||
mp_get_chroma_shift(image_format, &xs, &ys, NULL);
|
||||
mpglGenTextures(21, default_texs);
|
||||
default_texs[21] = 0;
|
||||
for (i = 0; i < 7; i++) {
|
||||
@ -670,7 +670,7 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin
|
||||
image_height = height;
|
||||
image_width = width;
|
||||
image_format = format;
|
||||
is_yuv = mp_get_chroma_shift(image_format, &xs, &ys) > 0;
|
||||
is_yuv = mp_get_chroma_shift(image_format, &xs, &ys, NULL) > 0;
|
||||
is_yuv |= (xs << 8) | (ys << 16);
|
||||
glFindFormat(format, NULL, &gl_texfmt, &gl_format, &gl_type);
|
||||
|
||||
@ -884,7 +884,7 @@ static int draw_slice(uint8_t *src[], int stride[], int w,int h,int x,int y)
|
||||
x, y, w, h, slice_height);
|
||||
if (is_yuv) {
|
||||
int xs, ys;
|
||||
mp_get_chroma_shift(image_format, &xs, &ys);
|
||||
mp_get_chroma_shift(image_format, &xs, &ys, NULL);
|
||||
mpglActiveTexture(GL_TEXTURE1);
|
||||
glUploadTex(gl_target, gl_format, gl_type, src[1], stride[1],
|
||||
x >> xs, y >> ys, w >> xs, h >> ys, slice_height);
|
||||
@ -951,7 +951,7 @@ static uint32_t get_image(mp_image_t *mpi) {
|
||||
if (is_yuv) {
|
||||
// planar YUV
|
||||
int xs, ys;
|
||||
mp_get_chroma_shift(image_format, &xs, &ys);
|
||||
mp_get_chroma_shift(image_format, &xs, &ys, NULL);
|
||||
mpi->flags |= MP_IMGFLAG_COMMON_STRIDE | MP_IMGFLAG_COMMON_PLANE;
|
||||
mpi->stride[0] = mpi->width;
|
||||
mpi->planes[1] = mpi->planes[0] + mpi->stride[0] * mpi->height;
|
||||
@ -1009,7 +1009,7 @@ static uint32_t draw_image(mp_image_t *mpi) {
|
||||
if (force_pbo && !(mpi->flags & MP_IMGFLAG_DIRECT) && !gl_bufferptr && get_image(&mpi2) == VO_TRUE) {
|
||||
int bpp = is_yuv ? 8 : mpi->bpp;
|
||||
int xs, ys;
|
||||
mp_get_chroma_shift(image_format, &xs, &ys);
|
||||
mp_get_chroma_shift(image_format, &xs, &ys, NULL);
|
||||
memcpy_pic(mpi2.planes[0], mpi->planes[0], mpi->w * bpp / 8, mpi->h, mpi2.stride[0], mpi->stride[0]);
|
||||
if (is_yuv) {
|
||||
memcpy_pic(mpi2.planes[1], mpi->planes[1], mpi->w >> xs, mpi->h >> ys, mpi2.stride[1], mpi->stride[1]);
|
||||
@ -1051,7 +1051,7 @@ static uint32_t draw_image(mp_image_t *mpi) {
|
||||
mpi->x, mpi->y, w, h, slice);
|
||||
if (is_yuv) {
|
||||
int xs, ys;
|
||||
mp_get_chroma_shift(image_format, &xs, &ys);
|
||||
mp_get_chroma_shift(image_format, &xs, &ys, NULL);
|
||||
if ((mpi->flags & MP_IMGFLAG_DIRECT) && !(mpi->flags & MP_IMGFLAG_COMMON_PLANE)) {
|
||||
mpglBindBuffer(GL_PIXEL_UNPACK_BUFFER, gl_buffer_uv[0]);
|
||||
mpglUnmapBuffer(GL_PIXEL_UNPACK_BUFFER);
|
||||
@ -1088,6 +1088,7 @@ draw_frame(uint8_t *src[])
|
||||
static int
|
||||
query_format(uint32_t format)
|
||||
{
|
||||
int depth;
|
||||
int caps = VFCAP_CSP_SUPPORTED | VFCAP_CSP_SUPPORTED_BY_HW |
|
||||
VFCAP_FLIP |
|
||||
VFCAP_HWSCALE_UP | VFCAP_HWSCALE_DOWN | VFCAP_ACCEPT_STRIDE;
|
||||
@ -1095,7 +1096,8 @@ query_format(uint32_t format)
|
||||
caps |= VFCAP_OSD | VFCAP_EOSD | (scaled_osd ? 0 : VFCAP_EOSD_UNSCALED);
|
||||
if (format == IMGFMT_RGB24 || format == IMGFMT_RGBA)
|
||||
return caps;
|
||||
if (use_yuv && mp_get_chroma_shift(format, NULL, NULL) &&
|
||||
if (use_yuv && mp_get_chroma_shift(format, NULL, NULL, &depth) &&
|
||||
(depth == 8 || depth == 16) &&
|
||||
(IMGFMT_IS_YUVP16_NE(format) || !IMGFMT_IS_YUVP16(format)))
|
||||
return caps;
|
||||
// HACK, otherwise we get only b&w with some filters (e.g. -vf eq)
|
||||
|
@ -274,7 +274,7 @@ static int initTextures(void)
|
||||
glTexEnvf (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
|
||||
if (is_yuv) {
|
||||
int xs, ys;
|
||||
mp_get_chroma_shift(image_format, &xs, &ys);
|
||||
mp_get_chroma_shift(image_format, &xs, &ys, NULL);
|
||||
mpglActiveTexture(GL_TEXTURE1);
|
||||
glCreateClearTex(GL_TEXTURE_2D, gl_internal_format, gl_bitmap_format, gl_bitmap_type, GL_LINEAR,
|
||||
texture_width >> xs, texture_height >> ys, 128);
|
||||
@ -580,7 +580,7 @@ static int initGl(uint32_t d_width, uint32_t d_height)
|
||||
mpglBindProgram(GL_FRAGMENT_PROGRAM, fragprog);
|
||||
break;
|
||||
}
|
||||
mp_get_chroma_shift(image_format, &xs, &ys);
|
||||
mp_get_chroma_shift(image_format, &xs, &ys, NULL);
|
||||
params.chrom_texw = params.texw >> xs;
|
||||
params.chrom_texh = params.texh >> ys;
|
||||
glSetupYUVConversion(¶ms);
|
||||
@ -616,7 +616,7 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin
|
||||
image_height = height;
|
||||
image_width = width;
|
||||
image_format = format;
|
||||
is_yuv = mp_get_chroma_shift(image_format, &xs, &ys) > 0;
|
||||
is_yuv = mp_get_chroma_shift(image_format, &xs, &ys, NULL) > 0;
|
||||
is_yuv |= (xs << 8) | (ys << 16);
|
||||
|
||||
#ifdef CONFIG_GL_WIN32
|
||||
@ -741,7 +741,7 @@ static int draw_slice(uint8_t *src[], int stride[], int w,int h,int x,int y)
|
||||
struct TexSquare *texline = &texgrid[y / texture_height * texnumx];
|
||||
int subtex_y = y % texture_width;
|
||||
int xs, ys;
|
||||
mp_get_chroma_shift(image_format, &xs, &ys);
|
||||
mp_get_chroma_shift(image_format, &xs, &ys, NULL);
|
||||
while (rem_h > 0) {
|
||||
int rem_w = w;
|
||||
struct TexSquare *tsq = &texline[x / texture_width];
|
||||
@ -802,7 +802,9 @@ draw_frame(uint8_t *src[])
|
||||
static int
|
||||
query_format(uint32_t format)
|
||||
{
|
||||
if (use_yuv && mp_get_chroma_shift(format, NULL, NULL) &&
|
||||
int depth;
|
||||
if (use_yuv && mp_get_chroma_shift(format, NULL, NULL, &depth) &&
|
||||
(depth == 8 || depth == 16) &&
|
||||
(IMGFMT_IS_YUVP16_NE(format) || !IMGFMT_IS_YUVP16(format)))
|
||||
return VFCAP_CSP_SUPPORTED | VFCAP_CSP_SUPPORTED_BY_HW | VFCAP_OSD |
|
||||
VFCAP_HWSCALE_UP | VFCAP_HWSCALE_DOWN | VFCAP_ACCEPT_STRIDE;
|
||||
|
11
mplayer.c
11
mplayer.c
@ -747,11 +747,6 @@ void exit_player_with_rc(struct MPContext *mpctx, enum exit_reason how, int rc)
|
||||
|
||||
current_module="exit_player";
|
||||
|
||||
// free mplayer config
|
||||
if(mpctx->mconfig)
|
||||
m_config_free(mpctx->mconfig);
|
||||
mpctx->mconfig = NULL;
|
||||
|
||||
if(mpctx->playtree_iter)
|
||||
play_tree_iter_free(mpctx->playtree_iter);
|
||||
mpctx->playtree_iter = NULL;
|
||||
@ -781,6 +776,12 @@ void exit_player_with_rc(struct MPContext *mpctx, enum exit_reason how, int rc)
|
||||
}
|
||||
mp_msg(MSGT_CPLAYER,MSGL_DBG2,"max framesize was %d bytes\n",max_framesize);
|
||||
|
||||
// must be last since e.g. mp_msg uses option values
|
||||
// that will be freed by this.
|
||||
if (mpctx->mconfig)
|
||||
m_config_free(mpctx->mconfig);
|
||||
mpctx->mconfig = NULL;
|
||||
|
||||
exit(rc);
|
||||
}
|
||||
|
||||
|
@ -68,7 +68,14 @@ play_tree_free(play_tree_t* pt, int children) {
|
||||
for(iter = pt->child ; iter != NULL ; iter = iter->next)
|
||||
iter->parent = NULL;
|
||||
|
||||
//free(pt->params);
|
||||
if (pt->params) {
|
||||
int i;
|
||||
for(i = 0 ; pt->params[i].name != NULL ; i++) {
|
||||
free(pt->params[i].name);
|
||||
free(pt->params[i].value);
|
||||
}
|
||||
free(pt->params);
|
||||
}
|
||||
if(pt->files) {
|
||||
int i;
|
||||
for(i = 0 ; pt->files[i] != NULL ; i++)
|
||||
|
@ -254,6 +254,8 @@ static int cache_fill(cache_vars_t *s)
|
||||
}
|
||||
|
||||
static int cache_execute_control(cache_vars_t *s) {
|
||||
double double_res;
|
||||
unsigned uint_res;
|
||||
static unsigned last;
|
||||
int quit = s->control == -2;
|
||||
if (quit || !s->stream->control) {
|
||||
@ -273,18 +275,22 @@ static int cache_execute_control(cache_vars_t *s) {
|
||||
}
|
||||
if (s->control == -1) return 1;
|
||||
switch (s->control) {
|
||||
case STREAM_CTRL_GET_CURRENT_TIME:
|
||||
case STREAM_CTRL_SEEK_TO_TIME:
|
||||
double_res = s->control_double_arg;
|
||||
case STREAM_CTRL_GET_CURRENT_TIME:
|
||||
case STREAM_CTRL_GET_ASPECT_RATIO:
|
||||
s->control_res = s->stream->control(s->stream, s->control, &s->control_double_arg);
|
||||
s->control_res = s->stream->control(s->stream, s->control, &double_res);
|
||||
s->control_double_arg = double_res;
|
||||
break;
|
||||
case STREAM_CTRL_SEEK_TO_CHAPTER:
|
||||
case STREAM_CTRL_SET_ANGLE:
|
||||
uint_res = s->control_uint_arg;
|
||||
case STREAM_CTRL_GET_NUM_CHAPTERS:
|
||||
case STREAM_CTRL_GET_CURRENT_CHAPTER:
|
||||
case STREAM_CTRL_GET_NUM_ANGLES:
|
||||
case STREAM_CTRL_GET_ANGLE:
|
||||
case STREAM_CTRL_SET_ANGLE:
|
||||
s->control_res = s->stream->control(s->stream, s->control, &s->control_uint_arg);
|
||||
s->control_res = s->stream->control(s->stream, s->control, &uint_res);
|
||||
s->control_uint_arg = uint_res;
|
||||
break;
|
||||
default:
|
||||
s->control_res = STREAM_UNSUPPORTED;
|
||||
|
@ -167,7 +167,7 @@ static stream_t *open_stream_plugin(const stream_info_t *sinfo,
|
||||
m_option_t url_opt =
|
||||
{ "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);
|
||||
mp_tmsg(MSGT_OPEN,MSGL_ERR, "URL parsing failed on url %s\n",filename);
|
||||
m_struct_free(desc,arg);
|
||||
return NULL;
|
||||
}
|
||||
@ -251,7 +251,7 @@ stream_t *open_stream_full(const char *filename, int mode,
|
||||
}
|
||||
}
|
||||
|
||||
mp_msg(MSGT_OPEN,MSGL_ERR, "No stream found to handle url %s\n",filename);
|
||||
mp_tmsg(MSGT_OPEN,MSGL_ERR, "No stream found to handle url %s\n", filename);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -365,7 +365,7 @@ if(newpos==0 || newpos!=s->pos){
|
||||
#ifdef CONFIG_NETWORKING
|
||||
if(s->seek) { // new stream seek is much cleaner than streaming_ctrl one
|
||||
if(!s->seek(s,newpos)) {
|
||||
mp_msg(MSGT_STREAM,MSGL_ERR, "Seek failed\n");
|
||||
mp_tmsg(MSGT_STREAM,MSGL_ERR, "Seek failed\n");
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
@ -373,14 +373,15 @@ if(newpos==0 || newpos!=s->pos){
|
||||
|
||||
if( s->streaming_ctrl!=NULL && s->streaming_ctrl->streaming_seek ) {
|
||||
if( s->streaming_ctrl->streaming_seek( s->fd, newpos, s->streaming_ctrl )<0 ) {
|
||||
mp_msg(MSGT_STREAM,MSGL_INFO,"Stream not seekable!\n");
|
||||
mp_tmsg(MSGT_STREAM,MSGL_INFO,"Stream not seekable!\n");
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
if(newpos<s->pos){
|
||||
mp_msg(MSGT_STREAM,MSGL_INFO,"Cannot seek backward in linear streams!\n");
|
||||
mp_tmsg(MSGT_STREAM, MSGL_INFO,
|
||||
"Cannot seek backward in linear streams!\n");
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
@ -390,7 +391,7 @@ if(newpos==0 || newpos!=s->pos){
|
||||
return 0;
|
||||
// Now seek
|
||||
if(!s->seek(s,newpos)) {
|
||||
mp_msg(MSGT_STREAM,MSGL_ERR, "Seek failed\n");
|
||||
mp_tmsg(MSGT_STREAM,MSGL_ERR, "Seek failed\n");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
@ -38,6 +38,7 @@
|
||||
#include <limits.h>
|
||||
#if defined(__MINGW32__) || defined(__CYGWIN__)
|
||||
#ifdef __MINGW32__
|
||||
#include <path.h>
|
||||
#define mkdir(a,b) mkdir(a)
|
||||
#endif
|
||||
#include <windows.h>
|
||||
|
@ -67,7 +67,7 @@ static inline unsigned int vcd_get_msf(mp_vcd_priv_t* vcd)
|
||||
return CDConvertMSFToLBA(vcd->msf);
|
||||
}
|
||||
|
||||
int vcd_seek_to_track(mp_vcd_priv_t* vcd, int track)
|
||||
static int vcd_seek_to_track(mp_vcd_priv_t* vcd, int track)
|
||||
{
|
||||
struct CDTrackInfo entry;
|
||||
|
||||
|
@ -136,7 +136,7 @@ read_toc_entry(mp_vcd_priv_t *vcd, int nr)
|
||||
return 1;
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
vcd_seek_to_track(mp_vcd_priv_t* vcd, int track)
|
||||
{
|
||||
if (!read_toc_entry(vcd, track))
|
||||
|
@ -57,7 +57,7 @@ static inline unsigned vcd_get_msf(mp_vcd_priv_t *vcd)
|
||||
(vcd->msfCurrent.bSecond + vcd->msfCurrent.bMinute * 60) * 75 - 150;
|
||||
}
|
||||
|
||||
int vcd_seek_to_track(mp_vcd_priv_t *vcd, int track)
|
||||
static int vcd_seek_to_track(mp_vcd_priv_t *vcd, int track)
|
||||
{
|
||||
struct {
|
||||
UCHAR auchSign[4];
|
||||
|
@ -53,7 +53,7 @@ static inline unsigned vcd_get_msf(mp_vcd_priv_t* vcd, int track){
|
||||
vcd->toc.TrackData[index].Address[1] * 60) * 75 - 150;
|
||||
}
|
||||
|
||||
int vcd_seek_to_track(mp_vcd_priv_t* vcd, int track)
|
||||
static int vcd_seek_to_track(mp_vcd_priv_t* vcd, int track)
|
||||
{
|
||||
unsigned sect;
|
||||
if (track < vcd->toc.FirstTrack || track > vcd->toc.LastTrack)
|
||||
|
@ -177,6 +177,8 @@ static subtitle *sub_read_line_sami(stream_t* st, subtitle *current,
|
||||
break;
|
||||
|
||||
case 3: /* get all text until '<' appears */
|
||||
if (p - text >= LINE_LEN)
|
||||
sami_add_line(current, text, &p);
|
||||
if (*s == '\0') break;
|
||||
else if (!strncasecmp (s, "<br>", 4)) {
|
||||
sami_add_line(current, text, &p);
|
||||
|
Loading…
Reference in New Issue
Block a user