Index: configure =================================================================== RCS file: /cvsroot/mplayer/main/configure,v retrieving revision 1.979 diff -u -r1.979 configure --- configure 17 Apr 2005 13:04:28 -0000 1.979 +++ configure 23 Apr 2005 16:39:00 -0000 @@ -214,6 +214,7 @@ --enable-external-tremor build with external tremor [disabled] --disable-vorbis disable OggVorbis support entirely [autodetect] --enable-theora build with OggTheora support [autodetect] + --enable-theora-exp build with experimental OggTheora support [autodetect] --disable-internal-matroska disable internal Matroska support [enabled] --enable-external-faad build with external FAAD2 (AAC) support [autodetect] --disable-internal-faad disable internal FAAD2 (AAC) support [autodetect] @@ -1325,6 +1326,7 @@ _tremor_low=no _vorbis=auto _theora=auto +_theoraexp=auto _mp3lib=yes _liba52=yes _libdts=auto @@ -1517,6 +1519,8 @@ --disable-external-tremor) _tremor=no ;; --enable-theora) _theora=yes ;; --disable-theora) _theora=no ;; + --enable-theora-exp) _theoraexp=yes ;; + --disable-theora-exp) _theoraexp=no ;; --enable-mp3lib) _mp3lib=yes ;; --disable-mp3lib) _mp3lib=no ;; --enable-liba52) _liba52=yes ;; @@ -5207,54 +5211,37 @@ echores "$_vorbis" fi -echocheck "OggTheora support (only the CVS version!)" +echocheck "OggTheora support" if test "$_theora" = auto ; then _theora=no - cat > $TMPC << EOF -#include -#include -int main(void) -{ - /* theora is in flux, make sure that all interface routines and - * datatypes exist and work the way we expect it, so we don't break - * mplayer */ - ogg_packet op; - theora_comment tc; - theora_info inf; - theora_state st; - yuv_buffer yuv; - int r; - double t; - - theora_info_init (&inf); - theora_comment_init (&tc); - - return 0; - - /* we don't want to execute this kind of nonsense; just for making sure - * that compilation works... */ - memset(&op, 0, sizeof(op)); - r = theora_decode_header (&inf, &tc, &op); - r = theora_decode_init (&st, &inf); - t = theora_granule_time (&st, op.granulepos); - r = theora_decode_packetin (&st, &op); - r = theora_decode_YUVout (&st, &yuv); - theora_clear (&st); - - return 0; -} -EOF - cc_check -ltheora -logg $_ld_lm && _theora=yes + pkg-config --exists 'theora' && _theora=yes fi -if test "$_theora" = yes ; then +if test "$_theoraexp" = auto ; then + _theoraexp=no + pkg-config --exists 'theoradec' && _theoraexp=yes +fi +if test "$_theoraexp" = yes ; then + _theora=yes + _def_theora='#define HAVE_OGGTHEORA_EXP 1' + _codecmodules="libtheoradec $_codecmodules" + _ld_theora=`pkg-config --libs theoradec` + _inc_theora=`pkg-config --cflags theoradec` + _inc_extra="$_inc_theora $_inc_extra" + _theora_version=" (theora-exp)" +elif test "$_theora" = yes ; then _def_theora='#define HAVE_OGGTHEORA 1' _codecmodules="libtheora $_codecmodules" - _ld_theora="-ltheora -logg" + _ld_theora=`pkg-config --libs theora` + _inc_theora=`pkg-config --cflags theora` + _inc_extra="$_inc_theora $_inc_extra" + _theora_version=`pkg-config --modversion theora` + _theora_version="(Version $_theora_version)" else _def_theora='#undef HAVE_OGGTHEORA' _nocodecmodules="libtheora $_nocodecmodules" fi -echores "$_theora" + +echores "$_theora $_theora_version" echocheck "mp3lib support" if test "$_mp3lib" = yes ; then Index: etc/codecs.conf =================================================================== RCS file: /cvsroot/mplayer/main/etc/codecs.conf,v retrieving revision 1.409 diff -u -r1.409 codecs.conf --- etc/codecs.conf 20 Apr 2005 21:19:38 -0000 1.409 +++ etc/codecs.conf 23 Apr 2005 16:39:03 -0000 @@ -220,6 +220,14 @@ dll libtheora out YV12 +videocodec theoraexp + info "Theora (experimental version)" + status working + fourcc theo,Thra + driver theoraexp + dll libtheoradec + out YV12,422P,444P + ; prefer native codecs over win32? ; the win32 codecs probably are (better) optimized and support direct ; rendering, so this may be not the best idea... Index: libmpcodecs/Makefile =================================================================== RCS file: /cvsroot/mplayer/main/libmpcodecs/Makefile,v retrieving revision 1.138 diff -u -r1.138 Makefile --- libmpcodecs/Makefile 29 Dec 2004 19:51:56 -0000 1.138 +++ libmpcodecs/Makefile 23 Apr 2005 16:39:03 -0000 @@ -11,7 +11,7 @@ VIDEO_SRCS_LIB=vd_libmpeg2.c vd_nuv.c vd_lzo.c VIDEO_SRCS_NAT=vd_null.c vd_raw.c vd_hmblck.c vd_mpegpes.c vd_mtga.c vd_sgi.c -VIDEO_SRCS_OPT=vd_realvid.c vd_ffmpeg.c vd_dshow.c vd_dmo.c vd_vfw.c vd_vfwex.c vd_odivx.c vd_divx4.c vd_zrmjpeg.c vd_xanim.c vd_xvid.c vd_xvid4.c vd_libdv.c vd_qtvideo.c vd_theora.c +VIDEO_SRCS_OPT=vd_realvid.c vd_ffmpeg.c vd_dshow.c vd_dmo.c vd_vfw.c vd_vfwex.c vd_odivx.c vd_divx4.c vd_zrmjpeg.c vd_xanim.c vd_xvid.c vd_xvid4.c vd_libdv.c vd_qtvideo.c vd_theora.c vd_theora-exp.c VIDEO_SRCS=dec_video.c vd.c $(VIDEO_SRCS_NAT) $(VIDEO_SRCS_LIB) $(VIDEO_SRCS_OPT) VFILTER_SRCS=vf.c vf_vo.c vf_crop.c vf_expand.c vf_scale.c vf_format.c vf_noformat.c vf_yuy2.c vf_flip.c vf_rgb2bgr.c vf_rotate.c vf_mirror.c vf_palette.c vf_lavc.c vf_dvbscale.c vf_cropdetect.c vf_test.c vf_noise.c vf_yvu9.c vf_rectangle.c vf_lavcdeint.c vf_eq.c vf_eq2.c vf_halfpack.c vf_dint.c vf_1bpp.c vf_bmovl.c vf_2xsai.c vf_unsharp.c vf_swapuv.c vf_il.c vf_boxblur.c vf_sab.c vf_smartblur.c vf_perspective.c vf_down3dright.c vf_field.c vf_denoise3d.c vf_hqdn3d.c vf_detc.c vf_telecine.c vf_tfields.c vf_ivtc.c vf_ilpack.c vf_dsize.c vf_decimate.c vf_softpulldown.c vf_tinterlace.c vf_pullup.c pullup.c vf_framestep.c vf_tile.c vf_delogo.c vf_fil.c vf_hue.c vf_spp.c vf_yuvcsp.c vf_filmdint.c vf_kerndeint.c vf_rgbtest.c vf_qp.c vf_phase.c vf_divtc.c vf_harddup.c vf_softskip.c Index: libmpcodecs/vd.c =================================================================== RCS file: /cvsroot/mplayer/main/libmpcodecs/vd.c,v retrieving revision 1.83 diff -u -r1.83 vd.c --- libmpcodecs/vd.c 18 Apr 2005 15:52:37 -0000 1.83 +++ libmpcodecs/vd.c 23 Apr 2005 16:39:03 -0000 @@ -30,6 +30,7 @@ extern vd_functions_t mpcodecs_vd_null; extern vd_functions_t mpcodecs_vd_ffmpeg; extern vd_functions_t mpcodecs_vd_theora; +extern vd_functions_t mpcodecs_vd_theoraexp; extern vd_functions_t mpcodecs_vd_dshow; extern vd_functions_t mpcodecs_vd_dmo; extern vd_functions_t mpcodecs_vd_vfw; @@ -58,6 +59,9 @@ #ifdef USE_LIBAVCODEC &mpcodecs_vd_ffmpeg, #endif +#ifdef HAVE_OGGTHEORA_EXP + &mpcodecs_vd_theoraexp, +#endif #ifdef HAVE_OGGTHEORA &mpcodecs_vd_theora, #endif Index: libmpcodecs/vd_theora-exp.c =================================================================== RCS file: libmpcodecs/vd_theora-exp.c diff -N libmpcodecs/vd_theora-exp.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ libmpcodecs/vd_theora-exp.c 23 Apr 2005 16:39:03 -0000 @@ -0,0 +1,352 @@ + +#include +#include +#include +#include + +#include "config.h" +#include "mp_msg.h" +#include "help_mp.h" + +#ifdef HAVE_OGGTHEORA_EXP + +#include "vd_internal.h" + +static vd_info_t info = { + "Theora/VP3", + "theoraexp", + "David Kuehling", + "www.theora.org", + "Theora (experimental version)" +}; + +LIBVD_EXTERN(theoraexp) + +#include + +#define THEORA_NUM_HEADER_PACKETS 3 + +typedef struct theora_struct_st { + theora_dec_ctx *td; + theora_comment cc; + theora_info inf; + int pic_width; + int pic_height; + int pic_x; + int pic_y; +} theora_struct_t; + +// to set/get/query special features/parameters +static int control(sh_video_t *sh,int cmd,void* arg,...){ + theora_struct_t *context; + context=sh->context; + switch(cmd) { + case VDCTRL_QUERY_MAX_PP_LEVEL: + { + int pp_level_max; + if(theora_decode_ctl(context->td,OC_DECCTL_GET_PPLEVEL_MAX, + &pp_level_max,sizeof(pp_level_max))!=0) + return CONTROL_UNKNOWN; + return pp_level_max; + } + case VDCTRL_SET_PP_LEVEL: + if(theora_decode_ctl(context->td,OC_DECCTL_SET_PPLEVEL,arg, + sizeof(int))!=0) + return CONTROL_ERROR; + return CONTROL_OK; + case VDCTRL_QUERY_FORMAT: + switch(context->inf.pixel_fmt) { + case OC_PF_420: + if ((*((int*)arg)) == IMGFMT_YV12) + return CONTROL_TRUE; + break; + case OC_PF_422: + if ((*((int*)arg)) == IMGFMT_422P) + return CONTROL_TRUE; + break; + case OC_PF_444: + if ((*((int*)arg)) == IMGFMT_444P) + return CONTROL_TRUE; + break; + } + return CONTROL_FALSE; + } + + return CONTROL_UNKNOWN; +} + +/* + * init driver + */ +static int init(sh_video_t *sh){ + theora_struct_t *context = NULL; + theora_setup_info *ts = NULL; + int failed = 1; + int errorCode = 0; + ogg_packet op; + int imgfmt; + int i; + + /* this is not a loop, just a context, from which we can break on error */ + do + { + context = (theora_struct_t *)calloc (sizeof (theora_struct_t), 1); + sh->context = context; + if (!context) + break; + + theora_info_init(&context->inf); + theora_comment_init(&context->cc); + + /* Read all header packets, pass them to theora_decode_header. */ + for (i = 0; i < THEORA_NUM_HEADER_PACKETS; i++) + { + op.bytes = ds_get_packet (sh->ds, &op.packet); + op.b_o_s = 1; + if ( (errorCode = theora_decode_headerin (&context->inf, &context->cc, &ts, &op))<0 ) + { + mp_msg(MSGT_DECAUDIO, MSGL_ERR, "Broken Theora header; errorCode=%i!\n", errorCode); + break; + } + } + if (errorCode < 0) + break; + + context->td = theora_decode_alloc (&context->inf,ts); + if (context->td == NULL) + { + mp_msg(MSGT_DECVIDEO,MSGL_ERR,"Theora decode init failed: %i \n", + errorCode); + break; + } + + imgfmt=0; + switch(context->inf.pixel_fmt){ + case OC_PF_420:imgfmt=IMGFMT_YV12;break; + case OC_PF_422:imgfmt=IMGFMT_422P;break; + case OC_PF_444:imgfmt=IMGFMT_444P;break; + default: + { + mp_msg(MSGT_DECVIDEO,MSGL_ERR, + "Unknown Theora pixel format: %i \n", + context->inf.pixel_fmt); + } + } + if(imgfmt==0)break; + + failed = 0; + } while (0); + + /*We're done with the setup info, so we can free it now.*/ + theora_setup_free(ts); + + if (failed) + { + if (context) + { + theora_info_clear(&context->inf); + theora_comment_clear(&context->cc); + theora_decode_free(context->td); + free (context); + sh->context = NULL; + } + return 0; + } + + /*Now handle non-multiple-of-16 frame sizes.*/ + /*For pixel formats with decimated chroma planes, we don't particularly + want to deal with half chroma pixels, so we pad frames out to an even + luma pixel boundary.*/ + context->pic_width=context->inf.pic_width; + context->pic_height=context->inf.pic_height; + context->pic_x=context->inf.pic_x; + context->pic_y=context->inf.pic_y; + if(!(context->inf.pixel_fmt&1)) + { + context->pic_width+=context->pic_x&1; + context->pic_x&=~1; + context->pic_width+=context->pic_width&1; + } + if(!(context->inf.pixel_fmt&2)) + { + context->pic_height+=context->pic_y&1; + context->pic_y&=~1; + context->pic_height+=context->pic_height&1; + } + + if(sh->aspect==0.0 && context->inf.aspect_numerator!=0 && + context->inf.aspect_denominator!=0) + { + /*Note that because of the adjustments above, the frame aspect ratio + reported by mplayer might be slightly off. + However, this is the correct interpretation of the pixel aspect ratio + stored in the file.*/ + sh->aspect = (float)(context->inf.aspect_numerator * context->pic_width)/ + (context->inf.aspect_denominator * context->pic_height); + } + + mp_msg(MSGT_DECVIDEO,MSGL_V,"INFO: Theora video init ok!\n"); + + return mpcodecs_config_vo (sh,context->inf.pic_width,context->inf.pic_height,imgfmt); +} + +/* + * uninit driver + */ +static void uninit(sh_video_t *sh) +{ + theora_struct_t *context = (theora_struct_t *)sh->context; + + if (context) + { + theora_info_clear(&context->inf); + theora_comment_clear(&context->cc); + theora_decode_free(context->td); + free (context); + } +} + +/*libtheoradec's striped decode callback. + Theora decoding proceeds from the bottom of the frame to the top, but + mplayer's filters (vf_scale in particular) only work with data provided from + top to bottom. + Therefore we flip the buffer we pass to mplayer, so it receives data in the + order it expects. + The codec is marked as needing to be flipped, so mplayer will automatically + add a vf_flip filter to restore the buffer to the proper orientation before + display.*/ +static void stripe_decoded(void *_ctx,theora_ycbcr_buffer _buf, + int _yfrag0,int _yfrag_end) +{ + unsigned char *src[3]; + int stride[3]; + sh_video_t *sh; + theora_struct_t *context; + int pic_cx; + int pic_cy; + int pic_yend; + int y0; + int y_end; + + sh = (sh_video_t *)_ctx; + context = (theora_struct_t *)sh->context; + /*Clip the slice to the picture region.*/ + y0 = _yfrag0<<3; + y_end = _yfrag_end<<3; + if(context->pic_y>=y_end)return; + else if(context->pic_y>y0)y0=context->pic_y; + pic_yend=context->pic_y+context->pic_height; + if(y0>=pic_yend)return; + else if(pic_yendpic_x>>!(context->inf.pixel_fmt&1); + pic_cy=y0>>!(context->inf.pixel_fmt&2); + /*Fill in the buffer pointers.*/ + src[0]=_buf[0].data+y0*_buf[0].ystride+context->pic_x; + stride[0]=_buf[0].ystride; + src[1]=_buf[1].data+pic_cy*_buf[1].ystride+pic_cx; + stride[1]=_buf[1].ystride; + src[2]=_buf[2].data+pic_cy*_buf[2].ystride+pic_cx; + stride[2]=_buf[2].ystride; + mpcodecs_draw_slice(sh,src,stride,context->pic_width,y_end-y0, + 0,y0-context->pic_y); +} + +/* + * decode frame + */ +static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags) +{ + theora_stripe_callback cb; + theora_struct_t *context = (theora_struct_t *)sh->context; + int errorCode = 0; + ogg_packet op; + theora_ycbcr_buffer ycbcr; + mp_image_t* mpi; + int i; + ogg_int64_t granpos; + int pic_cx; + int pic_cy; + + /*Skip dropped frames entirely. + If we were using granpos for anything, we would still have to call + theora_decode_packetin() to keep them correct, but since we're not we + can just bail early.*/ + if(len<=0)return NULL; + + /*If we're not dropping frames, get an image.*/ + if(!(flags&VDFLAGS_DROPFRAME)){ + int mpi_flags; + mpi_flags = MP_IMGFLAG_PRESERVE; + cb.ctx = sh; + cb.stripe_decoded = stripe_decoded; + if(theora_decode_ctl(context->td, OC_DECCTL_SET_STRIPE_CB, &cb, + sizeof(cb))==0){ + mpi_flags |= MP_IMGFLAG_DRAW_CALLBACK; + } + mpi = mpcodecs_get_image(sh, MP_IMGTYPE_EXPORT, mpi_flags, + context->pic_width, context->pic_height); + if(!mpi) return NULL; + } + if(!mpi||!(mpi->flags & MP_IMGFLAG_DRAW_CALLBACK)) + { + cb.ctx = NULL; + cb.stripe_decoded = NULL; + theora_decode_ctl(context->td, OC_DECCTL_SET_STRIPE_CB, &cb, + sizeof(cb)); + } + + memset (&op, 0, sizeof (op)); + op.bytes = len; + op.packet = data; + op.granulepos = -1; + + /*Hard frame dropping: we keep keyframes (because they are long term + predictors, but otherwise skip decoding altogether).*/ + if((flags&VDFLAGS_DROPFRAME)==2&&theora_packet_iskeyframe(&op)<1) + return NULL; + + errorCode = theora_decode_packetin (context->td, &op, &granpos); + if (errorCode) + { + mp_msg(MSGT_DECVIDEO,MSGL_ERR,"Theora decode packetin failed: %i \n", + errorCode); + return NULL; + } + if(!(flags&VDFLAGS_DROPFRAME)){ + errorCode = theora_decode_ycbcr_out(context->td,ycbcr); + if (errorCode) + { + mp_msg(MSGT_DEMUX,MSGL_ERR,"Theora decode YUVout failed: %i \n", + errorCode); + return 0; + } + } + + /*Figure out the offset to the chroma plane origin.*/ + pic_cx=context->pic_x>>!(context->inf.pixel_fmt&1); + pic_cy=context->pic_y>>!(context->inf.pixel_fmt&2); + /*Technically we should now pad the luma plane to even pixel boundaries + (e.g., by copying the odd pixel that's in the picture region). + However, unless post-processing is enabled, we can't write to libtheora's + buffer, because it's being used as the reference frame! + So, since padding somewhere further down the vo pipeline seems difficult, + and an extra copy ridiculous, we just ignore the problem. + This could cause artifacts along the edge, because the encoder is allowed + to store complete garbage outside the picture region, but for now it + should be okay. + We _are_ guaranteed a buffer that's a multiple of 16, so there's no need + to worry about access violations.*/ + /*We're also not worrying about different color standards or chroma + sampling sites now, as I don't think mplayer has any way to determine + what the output device is using.*/ + mpi->planes[0]=ycbcr[0].data+context->pic_y*ycbcr[0].ystride+context->pic_x; + mpi->stride[0]=ycbcr[0].ystride; + mpi->planes[1]=ycbcr[1].data+pic_cy*ycbcr[1].ystride+pic_cx; + mpi->stride[1]=ycbcr[1].ystride; + mpi->planes[2]=ycbcr[2].data+pic_cy*ycbcr[2].ystride+pic_cx; + mpi->stride[2]=ycbcr[2].ystride; + + return mpi; +} + +#endif Index: libmpdemux/demux_ogg.c =================================================================== RCS file: /cvsroot/mplayer/main/libmpdemux/demux_ogg.c,v retrieving revision 1.68 diff -u -r1.68 demux_ogg.c --- libmpdemux/demux_ogg.c 27 Feb 2005 18:11:16 -0000 1.68 +++ libmpdemux/demux_ogg.c 23 Apr 2005 16:39:06 -0000 @@ -26,6 +26,9 @@ #include #endif +#ifdef HAVE_OGGTHEORA_EXP +#include +#endif #ifdef HAVE_OGGTHEORA #include #endif @@ -50,6 +53,17 @@ * without using theora_granule_time with the theora_state of the stream. * This is duplicated in `vd_theora.c'; put this in a common header? */ +#ifdef HAVE_OGGTHEORA_EXP +typedef struct theora_struct_st { + theora_dec_ctx *td; + theora_comment cc; + theora_info inf; + int pic_width; + int pic_height; + int pic_x; + int pic_y; +} theora_struct_t; +#endif #ifdef HAVE_OGGTHEORA typedef struct theora_struct_st { theora_state st; @@ -352,7 +366,7 @@ os->lastsize = blocksize; os->lastpos = pack->granulepos; } -# ifdef HAVE_OGGTHEORA +#if defined(HAVE_OGGTHEORA)||defined(HAVE_OGGTHEORA_EXP) } else if (os->theora) { /* we pass complete packets to theora, mustn't strip the header! */ data = pack->packet; @@ -363,8 +377,14 @@ decoder. */ if (context != NULL && !(*data&0x80)) { +#if defined(HAVE_OGGTHEORA) theora_info *thi = ((theora_struct_t*)context)->st.i; int keyframe_granule_shift=_ilog(thi->keyframe_frequency_force-1); +#endif +#if defined(HAVE_OGGTHEORA_EXP) + theora_info *thi = &(((theora_struct_t*)context)->inf); + int keyframe_granule_shift=thi->keyframe_granule_shift; +#endif int64_t iframemask = (1 << keyframe_granule_shift) - 1; if (pack->granulepos >= 0) @@ -380,7 +400,7 @@ pack->granulepos = os->lastpos; *pts = (double)os->lastpos / (double)os->samplerate; } -#endif /* HAVE_OGGTHEORA */ +#endif /* HAVE_OGGTHEORA||HAVE_OGGTHEORA_EXP */ # ifdef HAVE_FLAC } else if (os->flac) { /* we pass complete packets to flac, mustn't strip the header! */ @@ -825,17 +845,27 @@ mp_msg(MSGT_DEMUX,MSGL_INFO,"[Ogg] stream %d: audio (Vorbis), -aid %d\n",ogg_d->num_sub,n_audio-1); // check for Theora -# ifdef HAVE_OGGTHEORA +# if defined(HAVE_OGGTHEORA)||defined(HAVE_OGGTHEORA_EXP) } else if (pack.bytes >= 7 && !strncmp (&pack.packet[1], "theora", 6)) { int errorCode = 0; theora_info inf; theora_comment cc; - +#if defined(HAVE_OGGTHEORA_EXP) + theora_setup_info *ts = NULL; + int pic_width; + int pic_height; +#endif + theora_info_init (&inf); theora_comment_init (&cc); - + +#if defined(HAVE_OGGTHEORA) errorCode = theora_decode_header (&inf, &cc, &pack); - if (errorCode) +#endif +#if defined(HAVE_OGGTHEORA_EXP) + errorCode = theora_decode_headerin (&inf, &cc, &ts, &pack); +#endif + if (errorCode<0) mp_msg(MSGT_DEMUX,MSGL_ERR,"Theora header parsing failed: %i \n", errorCode); else @@ -850,8 +880,26 @@ (double)inf.fps_denominator; sh_v->frametime = ((double)inf.fps_denominator)/ (double)inf.fps_numerator; +#if defined(HAVE_OGGTHEORA_EXP) + pic_width = inf.pic_width; + pic_height = inf.pic_height; + if(!(inf.pixel_fmt&1)) + { + pic_width += inf.pic_x & 1; + pic_width += pic_width & 1; + } + if(!(inf.pixel_fmt&2)) + { + pic_height += inf.pic_y & 1; + pic_height += pic_height & 1; + } + sh_v->disp_w = sh_v->bih->biWidth = pic_width; + sh_v->disp_h = sh_v->bih->biHeight = pic_height; +#endif +#if defined(HAVE_OGGTHEORA) sh_v->disp_w = sh_v->bih->biWidth = inf.frame_width; sh_v->disp_h = sh_v->bih->biHeight = inf.frame_height; +#endif sh_v->bih->biBitCount = 24; sh_v->bih->biPlanes = 3; sh_v->bih->biSizeImage = ((sh_v->bih->biBitCount/8) * @@ -871,7 +919,12 @@ n_video - 1); if(verbose>0) print_video_header(sh_v->bih); } -# endif /* HAVE_OGGTHEORA */ +#ifdef HAVE_OGGTHEORA_EXP + theora_setup_free(ts); +#endif + theora_info_clear(&inf); + theora_comment_clear(&cc); +# endif /* HAVE_OGGTHEORA||HAVE_OGGTHEORA_EXP */ # ifdef HAVE_FLAC } else if (pack.bytes >= 4 && !strncmp (&pack.packet[0], "fLaC", 4)) { sh_a = new_sh_audio(demuxer,ogg_d->num_sub); Index: tremor/os_types.h =================================================================== RCS file: /cvsroot/mplayer/main/tremor/os_types.h,v retrieving revision 1.3 diff -u -r1.3 os_types.h --- tremor/os_types.h 4 Jan 2005 15:18:07 -0000 1.3 +++ tremor/os_types.h 23 Apr 2005 16:39:08 -0000 @@ -36,6 +36,7 @@ typedef int64_t ogg_int64_t; typedef int32_t ogg_int32_t; typedef uint32_t ogg_uint32_t; + typedef uint16_t ogg_uint16_t; typedef int16_t ogg_int16_t; #endif /* _OS_TYPES_H */