changeset 16314:6720cdd99559

Fix mpeg-pes playback
author rtognimp
date Fri, 26 Aug 2005 22:53:59 +0000
parents f1951428d8b7
children 175eb8754ff3
files libmpdemux/demux_mpg.c libmpdemux/video.c
diffstat 2 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_mpg.c	Fri Aug 26 19:08:28 2005 +0000
+++ b/libmpdemux/demux_mpg.c	Fri Aug 26 22:53:59 2005 +0000
@@ -804,7 +804,7 @@
 
 static int demux_mpg_pes_probe(demuxer_t *demuxer) {
    demuxer->synced = 3;
-   return demux_mpg_probe(demuxer);
+   return (demux_mpg_probe(demuxer) == DEMUXER_TYPE_MPEG_PS) ? DEMUXER_TYPE_MPEG_PES : 0;
 }
 
 
@@ -874,7 +874,7 @@
   0, // unsafe autodetect
   demux_mpg_pes_probe,
   demux_mpg_fill_buffer,
-  NULL,
+  demux_mpg_ps_open,
   demux_close_mpg,
   demux_seek_mpg,
   NULL
--- a/libmpdemux/video.c	Fri Aug 26 19:08:28 2005 +0000
+++ b/libmpdemux/video.c	Fri Aug 26 22:53:59 2005 +0000
@@ -47,6 +47,7 @@
 if((d_video->demuxer->file_format == DEMUXER_TYPE_PVA) ||
    (d_video->demuxer->file_format == DEMUXER_TYPE_MPEG_ES) ||
    (d_video->demuxer->file_format == DEMUXER_TYPE_MPEG_GXF) ||
+   (d_video->demuxer->file_format == DEMUXER_TYPE_MPEG_PES) ||
    (d_video->demuxer->file_format == DEMUXER_TYPE_MPEG_PS && ((! sh_video->format) || (sh_video->format==0x10000001) || (sh_video->format==0x10000002))) ||
    (d_video->demuxer->file_format == DEMUXER_TYPE_MPEG_TY) ||
    (d_video->demuxer->file_format == DEMUXER_TYPE_MPEG_TS && ((sh_video->format==0x10000001) || (sh_video->format==0x10000002)))
@@ -405,6 +406,7 @@
 
   if(demuxer->file_format==DEMUXER_TYPE_MPEG_ES || 
      demuxer->file_format==DEMUXER_TYPE_MPEG_GXF ||
+     demuxer->file_format==DEMUXER_TYPE_MPEG_PES ||
   	(demuxer->file_format==DEMUXER_TYPE_MPEG_PS && ((! sh_video->format) || (sh_video->format==0x10000001) || (sh_video->format==0x10000002)))
 		  || demuxer->file_format==DEMUXER_TYPE_PVA || 
 		  ((demuxer->file_format==DEMUXER_TYPE_MPEG_TS) && ((sh_video->format==0x10000001) || (sh_video->format==0x10000002)))
@@ -596,6 +598,7 @@
     }
     
     if(demuxer->file_format==DEMUXER_TYPE_MPEG_PS ||
+       demuxer->file_format==DEMUXER_TYPE_MPEG_PES ||
        ((demuxer->file_format==DEMUXER_TYPE_MPEG_TS) && ((sh_video->format==0x10000001) || (sh_video->format==0x10000002))) ||
        demuxer->file_format==DEMUXER_TYPE_MPEG_ES ||
        demuxer->file_format==DEMUXER_TYPE_MPEG_TY){