mirror of
https://github.com/mpv-player/mpv
synced 2024-12-24 07:33:46 +01:00
demux: fix "-demuxer mpegps", don't force demuxer in stream_dvd
Internally, stream_dvd.c returned DEMUXER_TYPE_MPEG_PS, and the same value was hardcoded to enforced usage of demux_lavf in demux.c. But "-demuxer mpegps" basically did the same, so that switch was broken for this format. Undo this and don't request a demuxer in stream_dvd.c. demux_lavf.c is (probably) good enough to probe correctly with DVD. Otherwise, we'd actually have to do something completely different to force the libavformat demuxer.
This commit is contained in:
parent
57571b5da3
commit
e9af899237
@ -987,7 +987,7 @@ struct demuxer *demux_open_withparams(struct MPOpts *opts,
|
||||
// format, instead of reyling on libav to auto-detect the stream's format
|
||||
// correctly.
|
||||
switch (file_format) {
|
||||
case DEMUXER_TYPE_MPEG_PS:
|
||||
//case DEMUXER_TYPE_MPEG_PS:
|
||||
//case DEMUXER_TYPE_MPEG_TS:
|
||||
case DEMUXER_TYPE_Y4M:
|
||||
case DEMUXER_TYPE_NSV:
|
||||
|
@ -1051,7 +1051,6 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) {
|
||||
stream->close = stream_dvd_close;
|
||||
stream->start_pos = (int64_t)d->cur_pack*2048;
|
||||
stream->end_pos = (int64_t)(d->cur_pgc->cell_playback[d->last_cell-1].last_sector)*2048;
|
||||
*file_format = DEMUXER_TYPE_MPEG_PS;
|
||||
mp_msg(MSGT_DVD,MSGL_V,"DVD start=%d end=%d \n",d->cur_pack,d->cur_pgc->cell_playback[d->last_cell-1].last_sector);
|
||||
stream->priv = (void*)d;
|
||||
return STREAM_OK;
|
||||
|
Loading…
Reference in New Issue
Block a user