[Redbutton-devel] SF.net SVN: redbutton: [59] redbutton-download/trunk/command.c
Brought to you by:
skilvington
|
From: <ski...@us...> - 2006-05-15 10:55:56
|
Revision: 59 Author: skilvington Date: 2006-05-15 03:55:48 -0700 (Mon, 15 May 2006) ViewCVS: http://svn.sourceforge.net/redbutton/?rev=59&view=rev Log Message: ----------- return an error if default A/V streams cannot be found Modified Paths: -------------- redbutton-download/trunk/command.c Modified: redbutton-download/trunk/command.c =================================================================== --- redbutton-download/trunk/command.c 2006-05-15 08:49:45 UTC (rev 58) +++ redbutton-download/trunk/command.c 2006-05-15 10:55:48 UTC (rev 59) @@ -152,6 +152,12 @@ /* map the tag to a PID and stream type, or use the default */ if(tag == -1) { + /* check we have a default stream */ + if(car->audio_pid == 0) + { + SEND_RESPONSE(500, "Unable to find audio PID"); + return false; + } pid = car->audio_pid; type = car->audio_type; } @@ -220,6 +226,12 @@ /* map the tag to a PID and stream type, or use the default */ if(tag == -1) { + /* check we have a default stream */ + if(car->video_pid == 0) + { + SEND_RESPONSE(500, "Unable to find video PID"); + return false; + } pid = car->video_pid; type = car->video_type; } @@ -293,6 +305,12 @@ /* map the tags to PIDs and stream types, or use the defaults */ if(audio_tag == -1) { + /* check we have a default stream */ + if(car->audio_pid == 0) + { + SEND_RESPONSE(500, "Unable to find audio PID"); + return false; + } audio_pid = car->audio_pid; audio_type = car->audio_type; } @@ -304,6 +322,12 @@ if(video_tag == -1) { + /* check we have a default stream */ + if(car->video_pid == 0) + { + SEND_RESPONSE(500, "Unable to find video PID"); + return false; + } video_pid = car->video_pid; video_type = car->video_type; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |