Mercurial > mplayer.hg
comparison subreader.c @ 31871:c3775dbb8509
Simplify code: allow file_format argument to open_stream to be NULL.
author | reimar |
---|---|
date | Tue, 10 Aug 2010 13:23:04 +0000 |
parents | 04cbed442964 |
children | 256b6b7d5e96 |
comparison
equal
deleted
inserted
replaced
31870:e061d5d981ba | 31871:c3775dbb8509 |
---|---|
1447 { sub_read_line_mpl2, NULL, "mpl2" } | 1447 { sub_read_line_mpl2, NULL, "mpl2" } |
1448 }; | 1448 }; |
1449 const struct subreader *srp; | 1449 const struct subreader *srp; |
1450 | 1450 |
1451 if(filename==NULL) return NULL; //qnx segfault | 1451 if(filename==NULL) return NULL; //qnx segfault |
1452 i = 0; | 1452 fd=open_stream (filename, NULL, NULL); if (!fd) return NULL; |
1453 fd=open_stream (filename, NULL, &i); if (!fd) return NULL; | |
1454 | 1453 |
1455 sub_format = SUB_INVALID; | 1454 sub_format = SUB_INVALID; |
1456 for (utf16 = 0; sub_format == SUB_INVALID && utf16 < 3; utf16++) { | 1455 for (utf16 = 0; sub_format == SUB_INVALID && utf16 < 3; utf16++) { |
1457 sub_format=sub_autodetect (fd, &uses_time, utf16); | 1456 sub_format=sub_autodetect (fd, &uses_time, utf16); |
1458 stream_reset(fd); | 1457 stream_reset(fd); |