openbsd-ports/x11/mplayer/patches/patch-libmpdemux_demuxer_c
jakemsr cc53e054b2 enable bktr(4) support, and enhance the bktr(4) support by:
- adding support for setting the channel set
- making it use audio(4) instead of ossaudio(3)
- making it explicitly mute the tuner on exit
- use the tuner as default video source, as opposed to RCA

ok biorn@, robert@
2006-01-17 07:41:58 +00:00

47 lines
1.8 KiB
Plaintext

$OpenBSD: patch-libmpdemux_demuxer_c,v 1.3 2006/01/17 07:41:58 jakemsr Exp $
--- libmpdemux/demuxer.c.orig Sun Apr 3 07:08:26 2005
+++ libmpdemux/demuxer.c Sun Dec 25 19:45:16 2005
@@ -168,7 +168,7 @@ extern int tv_param_on;
extern int demux_tv_fill_buffer(demuxer_t *demux, demux_stream_t *ds);
extern int demux_open_tv(demuxer_t *demuxer);
-#if defined(USE_TV) && (defined(HAVE_TV_V4L) || defined(HAVE_TV_V4L2))
+#if defined(USE_TV) && (defined(HAVE_TV_V4L) || defined(HAVE_TV_V4L2) || defined(HAVE_TV_BSDBT848))
extern void demux_close_tv(demuxer_t *demuxer);
#endif
#endif
@@ -199,7 +199,7 @@ void free_demuxer(demuxer_t *demuxer){
demux_close_nuv(demuxer); break;
case DEMUXER_TYPE_MPEG_TY:
demux_close_ty(demuxer); break;
-#if defined(USE_TV) && (defined(HAVE_TV_V4L) || defined(HAVE_TV_V4L2))
+#if defined(USE_TV) && (defined(HAVE_TV_V4L) || defined(HAVE_TV_V4L2) || defined(HAVE_TV_BSDBT848))
case DEMUXER_TYPE_TV:
demux_close_tv(demuxer); break;
#endif
@@ -1350,7 +1350,12 @@ switch(file_format){
case DEMUXER_TYPE_MPEG_TY:
case DEMUXER_TYPE_MPEG_PS: {
- sh_video=d_video->sh;sh_video->ds=d_video;
+ if (d_video)
+ sh_video=d_video->sh;
+ else
+ sh_video = NULL;
+ if (sh_video)
+ sh_video->ds=d_video;
// if(demuxer->stream->type!=STREAMTYPE_VCD) demuxer->movi_start=0; // for VCD
if(audio_id!=-2) {
@@ -1404,8 +1409,8 @@ pts_from_bps=0; // !!!
if ((sh_video=demuxer->video->sh) && sh_video->bih)
mp_msg(MSGT_DEMUX,MSGL_INFO,"VIDEO: [%.4s] %ldx%ld %dbpp %5.3f fps %5.1f kbps (%4.1f kbyte/s)\n",
(char *)&sh_video->bih->biCompression,
- sh_video->bih->biWidth,
- sh_video->bih->biHeight,
+ (long) sh_video->bih->biWidth,
+ (long) sh_video->bih->biHeight,
sh_video->bih->biBitCount,
sh_video->fps,
sh_video->i_bps*0.008f,