Mercurial > mplayer.hg
changeset 36660:7fd255e0db1b
stream.c: remove pointless NULL check.
Since it currently is a fixed-size array it can never be NULL.
But even if this was changed, this check has no real value:
it should still only be possible in case of an obvious code bug
during development and the crash it would cause would be easy enough
to debug.
author | reimar |
---|---|
date | Sun, 26 Jan 2014 18:59:15 +0000 |
parents | f41b65ac7e81 |
children | 1b0d31ceb2ec |
files | help/help_mp-de.h help/help_mp-en.h help/help_mp-zh_CN.h stream/stream.c |
diffstat | 4 files changed, 0 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/help/help_mp-de.h Sun Jan 26 18:19:31 2014 +0000 +++ b/help/help_mp-de.h Sun Jan 26 18:59:15 2014 +0000 @@ -567,7 +567,6 @@ #define MSGTR_URLParsingFailed "Fehler bei der Analyse der URL %s\n" #define MSGTR_FailedSetStreamOption "Datenstrom-Option %s=%s konnte nicht gesetzt werden.\n" #define MSGTR_StreamNeedType "Datenströme benötigen einen Typ!\n" -#define MSGTR_StreamProtocolNULL "Datenstromtyp %s hat protcols == NULL, das ist ein Fehler\n" #define MSGTR_StreamCantHandleURL "Kein Datenstrom zur Verarbeitung der URL %s gefunden.\n" #define MSGTR_StreamNULLFilename "open_output_stream(), Dateiname NULL, Fehler bitte melden\n" #define MSGTR_StreamErrorWritingCapture "Fehler beim Schreiben der Capture-Datei: %s\n"
--- a/help/help_mp-en.h Sun Jan 26 18:19:31 2014 +0000 +++ b/help/help_mp-en.h Sun Jan 26 18:59:15 2014 +0000 @@ -1929,7 +1929,6 @@ #define MSGTR_URLParsingFailed "URL parsing failed on url %s\n" #define MSGTR_FailedSetStreamOption "Failed to set stream option %s=%s\n" #define MSGTR_StreamNeedType "Streams need a type!\n" -#define MSGTR_StreamProtocolNULL "Stream type %s has protocols == NULL, it's a bug\n" #define MSGTR_StreamCantHandleURL "No stream found to handle url %s\n" #define MSGTR_StreamNULLFilename "open_output_stream(), NULL filename, report this bug\n" #define MSGTR_StreamErrorWritingCapture "Error writing capture file: %s\n"
--- a/help/help_mp-zh_CN.h Sun Jan 26 18:19:31 2014 +0000 +++ b/help/help_mp-zh_CN.h Sun Jan 26 18:59:15 2014 +0000 @@ -1924,7 +1924,6 @@ #define MSGTR_URLParsingFailed "URL %s 解析失败\n" #define MSGTR_FailedSetStreamOption "未能设置媒体流选项 %s=%s\n" #define MSGTR_StreamNeedType "媒体流需有类型!\n" -#define MSGTR_StreamProtocolNULL "媒体流类型 %s 的 protocols == NULL,这是软件缺陷\n" #define MSGTR_StreamCantHandleURL "未找到媒体流以处理 URL %s\n" #define MSGTR_StreamNULLFilename "open_output_stream(),文件名为 NULL,请报告该缺陷\n" #define MSGTR_StreamErrorWritingCapture "写入流捕获文件错误:%s\n"
--- a/stream/stream.c Sun Jan 26 18:19:31 2014 +0000 +++ b/stream/stream.c Sun Jan 26 18:59:15 2014 +0000 @@ -226,10 +226,6 @@ for(i = 0 ; auto_open_streams[i] ; i++) { sinfo = auto_open_streams[i]; - if(!sinfo->protocols) { - mp_msg(MSGT_OPEN,MSGL_WARN, MSGTR_StreamProtocolNULL, sinfo->name); - continue; - } for(j = 0 ; sinfo->protocols[j] ; j++) { l = strlen(sinfo->protocols[j]); // l == 0 => Don't do protocol matching (ie network and filenames)