diff options
author | kmkaplan <kmkaplan@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-03-29 03:17:57 +0000 |
---|---|---|
committer | kmkaplan <kmkaplan@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-03-29 03:17:57 +0000 |
commit | 4d38521e2cd1e62ef334a73624cbd4a95f1de436 (patch) | |
tree | 4062471fbc1275741c53a621d3a761176cf69d2e /mencoder.c | |
parent | 7498cf71456f9b64005250c9c780797d169ba23d (diff) | |
download | mpv-4d38521e2cd1e62ef334a73624cbd4a95f1de436.tar.bz2 mpv-4d38521e2cd1e62ef334a73624cbd4a95f1de436.tar.xz |
* New command line switch for mplayer & mencoder:
-ifo <ifo file>
Indicate the file that will be used to load palette and frame size
for MPEG subtitles.
* mencoder.c:
Fix cropping when decoding MPEG2.
* spudec.c:
If scaling is needed only do it once.
Change WITH_NO_ANTIALIASING to ANTIALIASING_ALGORITHM.
* vobsub.c:
Support reading info regarding size and palette from IDX file instead of IFO file.
Support streams containing audio or video.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5389 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mencoder.c')
-rw-r--r-- | mencoder.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/mencoder.c b/mencoder.c index ace0745eb0..58fc216efe 100644 --- a/mencoder.c +++ b/mencoder.c @@ -123,6 +123,8 @@ int vcd_track=0; int audio_id=-1; int video_id=-1; int dvdsub_id=-1; +int vobsub_id=-1; +static char* spudec_ifo=NULL; static int has_audio=1; char *audio_codec=NULL; // override audio codec @@ -239,6 +241,7 @@ static int bits_per_pixel(uint32_t fmt); #ifdef USE_DVDREAD #include "spudec.h" #endif +#include "vobsub.h" /* FIXME */ void mencoder_exit(int level, char *how) @@ -270,8 +273,10 @@ void parse_cfgfiles( m_config_t* conf ) static unsigned char* vo_image=NULL; static unsigned char* vo_image_ptr=NULL; -static uint32_t draw_slice(uint8_t *src[], int stride[], int w,int h, int x0,int y0){ +static uint32_t draw_slice(const uint8_t *src0[], int stride[], int w,int h, int x0,int y0){ int y; + uint8_t *src[3]; + memcpy(src, src0, sizeof(src)); // printf("draw_slice %dx%d %d;%d\n",w,h,x0,y0); if(y0 + h < crop_y0) @@ -769,9 +774,16 @@ if(sh_audio && (out_audio_codec || seek_to_sec || !sh_audio->wf)){ // set up video encoder: +if (spudec_ifo) { + unsigned int palette[16], width, height; + if (vobsub_parse_ifo(spudec_ifo, palette, &width, &height, 1) >= 0) + vo_spudec=spudec_new_scaled(palette, sh_video->disp_w, sh_video->disp_h); +} +if (vo_spudec==NULL) { #ifdef USE_DVDREAD vo_spudec=spudec_new_scaled(stream->type==STREAMTYPE_DVD?((dvd_priv_t *)(stream->priv))->cur_pgc->palette:NULL, sh_video->disp_w, sh_video->disp_h); +} #endif // set up output file: |