Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
02497a5d
Commit
02497a5d
authored
10 years ago
by
Reynaldo H. Verdejo Pinochet
Browse files
Options
Downloads
Patches
Plain Diff
ffserver: don't hardcode RTSP status codes
Signed-off-by:
Reynaldo H. Verdejo Pinochet
<
r.verdejo@sisa.samsung.com
>
parent
5267a5d7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ffserver.c
+3
-37
3 additions, 37 deletions
ffserver.c
with
3 additions
and
37 deletions
ffserver.c
+
3
−
37
View file @
02497a5d
...
@@ -38,6 +38,7 @@
...
@@ -38,6 +38,7 @@
#include
"libavformat/rtpdec.h"
#include
"libavformat/rtpdec.h"
#include
"libavformat/rtpproto.h"
#include
"libavformat/rtpproto.h"
#include
"libavformat/rtsp.h"
#include
"libavformat/rtsp.h"
#include
"libavformat/rtspcodes.h"
#include
"libavformat/avio_internal.h"
#include
"libavformat/avio_internal.h"
#include
"libavformat/internal.h"
#include
"libavformat/internal.h"
#include
"libavformat/url.h"
#include
"libavformat/url.h"
...
@@ -2836,44 +2837,9 @@ static void rtsp_reply_header(HTTPContext *c, enum RTSPStatusCode error_number)
...
@@ -2836,44 +2837,9 @@ static void rtsp_reply_header(HTTPContext *c, enum RTSPStatusCode error_number)
struct
tm
*
tm
;
struct
tm
*
tm
;
char
buf2
[
32
];
char
buf2
[
32
];
switch
(
error_number
)
{
str
=
RTSP_STATUS_CODE2STRING
(
error_number
);
case
RTSP_STATUS_OK
:
if
(
!
str
)
str
=
"OK"
;
break
;
case
RTSP_STATUS_METHOD
:
str
=
"Method Not Allowed"
;
break
;
case
RTSP_STATUS_BANDWIDTH
:
str
=
"Not Enough Bandwidth"
;
break
;
case
RTSP_STATUS_SESSION
:
str
=
"Session Not Found"
;
break
;
case
RTSP_STATUS_STATE
:
str
=
"Method Not Valid in This State"
;
break
;
case
RTSP_STATUS_AGGREGATE
:
str
=
"Aggregate operation not allowed"
;
break
;
case
RTSP_STATUS_ONLY_AGGREGATE
:
str
=
"Only aggregate operation allowed"
;
break
;
case
RTSP_STATUS_TRANSPORT
:
str
=
"Unsupported transport"
;
break
;
case
RTSP_STATUS_INTERNAL
:
str
=
"Internal Server Error"
;
break
;
case
RTSP_STATUS_SERVICE
:
str
=
"Service Unavailable"
;
break
;
case
RTSP_STATUS_VERSION
:
str
=
"RTSP Version not supported"
;
break
;
default:
str
=
"Unknown Error"
;
str
=
"Unknown Error"
;
break
;
}
avio_printf
(
c
->
pb
,
"RTSP/1.0 %d %s
\r\n
"
,
error_number
,
str
);
avio_printf
(
c
->
pb
,
"RTSP/1.0 %d %s
\r\n
"
,
error_number
,
str
);
avio_printf
(
c
->
pb
,
"CSeq: %d
\r\n
"
,
c
->
seq
);
avio_printf
(
c
->
pb
,
"CSeq: %d
\r\n
"
,
c
->
seq
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment