[vlc-devel] commit: Fail properly for unknown G726 bit rates ( Rémi Denis-Courmont )

git version control git at videolan.org
Wed Jun 10 17:54:38 CEST 2009


vlc | branch: 1.0-bugfix | Rémi Denis-Courmont <remi at remlab.net> | Wed Jun 10 18:39:43 2009 +0300| [ecaac6df19e6ed67321514bd77d826249ace8d19] | committer: Rémi Denis-Courmont 

Fail properly for unknown G726 bit rates
(cherry picked from commit 17461bf4087a36bb6ccda7e54e52e5e49544ddf7)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ecaac6df19e6ed67321514bd77d826249ace8d19
---

 modules/stream_out/rtp.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/modules/stream_out/rtp.c b/modules/stream_out/rtp.c
index c4770f5..b91cebd 100644
--- a/modules/stream_out/rtp.c
+++ b/modules/stream_out/rtp.c
@@ -1096,6 +1096,10 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
                 id->psz_enc = "G726-40";
                 id->pf_packetize = rtp_packetize_g726_40;
                 break;
+            default:
+                msg_Err( p_stream, "cannot add this stream (unsupported "
+                         "G.726 bit rate: %u)", p_fmt->i_bitrate );
+                goto error;
             }
             break;
         case VLC_FOURCC( 'a', '5', '2', ' ' ):
@@ -1247,7 +1251,7 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
 
         default:
             msg_Err( p_stream, "cannot add this stream (unsupported "
-                     "codec:%4.4s)", (char*)&p_fmt->i_codec );
+                     "codec: %4.4s)", (char*)&p_fmt->i_codec );
             goto error;
     }
     if (id->i_payload_type >= 96)




More information about the vlc-devel mailing list