Changeset 9f427214afc526023b6841c527811add76b0bdd3

Show
Ignore:
Timestamp:
05/10/08 19:20:51 (4 months ago)
Author:
Jean-Paul Saman <jpsaman@videolan.org>
git-committer:
Jean-Paul Saman <jpsaman@videolan.org> 1210440051 +0200
git-parent:

[5c5e00162b13ee769e0dbd090057a70cfbd1218e]

git-author:
Miguel Angel Cabrera Moya <madmac2501@gmail.com> 1210279380 +0200
Message:

Fixed error handling in function

Signed-off-by: Jean-Paul Saman <jpsaman@videolan.org>

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/access/rtmp/rtmp_amf_flv.c

    re2edb44 r9f42721  
    229229static void rtmp_handler_null       ( rtmp_control_thread_t *p_thread, rtmp_packet_t *rtmp_packet ); 
    230230static void rtmp_handler_chunk_size ( rtmp_control_thread_t *p_thread, rtmp_packet_t *rtmp_packet ); 
    231 static int rtmp_handler_invoke     ( rtmp_control_thread_t *p_thread, rtmp_packet_t *rtmp_packet ); 
     231static void rtmp_handler_invoke     ( rtmp_control_thread_t *p_thread, rtmp_packet_t *rtmp_packet ); 
    232232static void rtmp_handler_audio_data ( rtmp_control_thread_t *p_thread, rtmp_packet_t *rtmp_packet ); 
    233233static void rtmp_handler_video_data ( rtmp_control_thread_t *p_thread, rtmp_packet_t *rtmp_packet ); 
     
    11191119} 
    11201120 
    1121 static int 
     1121static void 
    11221122rtmp_handler_invoke( rtmp_control_thread_t *p_thread, rtmp_packet_t *rtmp_packet ) 
    11231123{ 
     
    11491149        if( i_ret != tmp_rtmp_packet->length_encoded ) 
    11501150        { 
    1151             free( tmp_rtmp_packet->body->body ); 
    1152             free( tmp_rtmp_packet->body ); 
    1153             free( tmp_rtmp_packet ); 
    1154             free( tmp_buffer ); 
    11551151            msg_Err( p_thread, "failed send connection bandwith" ); 
    1156             return VLC_EGENERIC
     1152            goto error
    11571153        } 
    11581154        free( tmp_rtmp_packet->body->body ); 
     
    11691165        if( i_ret != tmp_rtmp_packet->length_encoded ) 
    11701166        { 
    1171             free( tmp_rtmp_packet->body->body ); 
    1172             free( tmp_rtmp_packet->body ); 
    1173             free( tmp_rtmp_packet ); 
    1174             free( tmp_buffer ); 
    11751167            msg_Err( p_thread, "failed send server bandwith" ); 
    1176             return VLC_EGENERIC
     1168            goto error
    11771169        } 
    11781170        free( tmp_rtmp_packet->body->body ); 
     
    11891181        if( i_ret != tmp_rtmp_packet->length_encoded ) 
    11901182        { 
    1191             free( tmp_rtmp_packet->body->body ); 
    1192             free( tmp_rtmp_packet->body ); 
    1193             free( tmp_rtmp_packet ); 
    1194             free( tmp_buffer ); 
    11951183            msg_Err( p_thread, "failed send clear stream" ); 
    1196             return VLC_EGENERIC
     1184            goto error
    11971185        } 
    11981186        free( tmp_rtmp_packet->body->body ); 
     
    12091197        if( i_ret != tmp_rtmp_packet->length_encoded ) 
    12101198        { 
    1211             free( tmp_rtmp_packet->body->body ); 
    1212             free( tmp_rtmp_packet->body ); 
    1213             free( tmp_rtmp_packet ); 
    1214             free( tmp_buffer ); 
    12151199            msg_Err( p_thread, "failed send reply NetConnection.connect" ); 
    1216             return VLC_EGENERIC
     1200            goto error
    12171201        } 
    12181202        free( tmp_rtmp_packet->body->body ); 
     
    12341218        if( i_ret != tmp_rtmp_packet->length_encoded ) 
    12351219        { 
    1236             free( tmp_rtmp_packet->body->body ); 
    1237             free( tmp_rtmp_packet->body ); 
    1238             free( tmp_rtmp_packet ); 
    1239             free( tmp_buffer ); 
    12401220            msg_Err( p_thread, "failed send reply createStream" ); 
    1241             return VLC_EGENERIC;  
     1221            goto error; 
    12421222        } 
    12431223        free( tmp_rtmp_packet->body->body ); 
     
    12541234        if( i_ret != tmp_rtmp_packet->length_encoded ) 
    12551235        { 
    1256             free( tmp_rtmp_packet->body->body ); 
    1257             free( tmp_rtmp_packet->body ); 
    1258             free( tmp_rtmp_packet ); 
    1259             free( tmp_buffer ); 
    12601236            msg_Err( p_thread, "failed send reset stream" ); 
    1261             return VLC_EGENERIC
     1237            goto error
    12621238        } 
    12631239        free( tmp_rtmp_packet->body->body ); 
     
    12741250        if( i_ret != tmp_rtmp_packet->length_encoded ) 
    12751251        { 
    1276             free( tmp_rtmp_packet->body->body ); 
    1277             free( tmp_rtmp_packet->body ); 
    1278             free( tmp_rtmp_packet ); 
    1279             free( tmp_buffer ); 
    12801252            msg_Err( p_thread, "failed send clear stream" ); 
    1281             return VLC_EGENERIC
     1253            goto error
    12821254        } 
    12831255        free( tmp_rtmp_packet->body->body ); 
     
    13161288        if( i_ret != tmp_rtmp_packet->length_encoded ) 
    13171289        { 
    1318             free( tmp_rtmp_packet->body->body ); 
    1319             free( tmp_rtmp_packet->body ); 
    1320             free( tmp_rtmp_packet ); 
    1321             free( tmp_buffer ); 
    13221290            msg_Err( p_thread, "failed send reply NetStream.play.reset" ); 
    1323             return VLC_EGENERIC
     1291            goto error
    13241292        } 
    13251293        free( tmp_rtmp_packet->body->body ); 
     
    13361304        if( i_ret != tmp_rtmp_packet->length_encoded ) 
    13371305        { 
    1338             free( tmp_rtmp_packet->body->body ); 
    1339             free( tmp_rtmp_packet->body ); 
    1340             free( tmp_rtmp_packet ); 
    1341             free( tmp_buffer ); 
    13421306            msg_Err( p_thread, "failed send reply NetStream.play.start" ); 
    1343             return VLC_EGENERIC
     1307            goto error
    13441308        } 
    13451309        free( tmp_rtmp_packet->body->body ); 
     
    14731437    free( rtmp_packet->body ); 
    14741438    free( rtmp_packet ); 
    1475     return VLC_SUCCESS; 
     1439 
     1440    return; 
     1441 
     1442error: 
     1443    free( tmp_rtmp_packet->body->body ); 
     1444    free( tmp_rtmp_packet->body ); 
     1445    free( tmp_rtmp_packet ); 
     1446    free( tmp_buffer ); 
    14761447} 
    14771448