Make sure we do not strdup(NULL), avoids a crash with non-real streams.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29621 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar
2009-09-02 10:22:08 +00:00
parent 5c4a06530d
commit 079a64ae8d
+4 -1
View File
@@ -441,7 +441,10 @@ rmff_header_t *real_setup_and_get_header(rtsp_t *rtsp_session, uint32_t bandwidt
int i;
/* get challenge */
challenge1=strdup(rtsp_search_answers(rtsp_session,"RealChallenge1"));
challenge1=rtsp_search_answers(rtsp_session,"RealChallenge1");
if (!challenge1)
goto out;
challenge1=strdup(challenge1);
#ifdef LOG
printf("real: Challenge1: %s\n", challenge1);
#endif