comparison libmpdemux/demux_ty.c @ 23703:9fb716ab06a3

Avoid code duplication and ugly config.h hack by using av_strlcat/av_strlcpy instead of plain strlcat/strlcpy
author reimar
date Thu, 05 Jul 2007 22:01:07 +0000
parents 300e9b7c499f
children 6af1c486d844
comparison
equal deleted inserted replaced
23702:5159b5f8784e 23703:9fb716ab06a3
42 #include "stream/stream.h" 42 #include "stream/stream.h"
43 #include "demuxer.h" 43 #include "demuxer.h"
44 #include "parse_es.h" 44 #include "parse_es.h"
45 #include "stheader.h" 45 #include "stheader.h"
46 #include "sub_cc.h" 46 #include "sub_cc.h"
47 #include "libavutil/avstring.h"
47 48
48 extern void skip_audio_frame( sh_audio_t *sh_audio ); 49 extern void skip_audio_frame( sh_audio_t *sh_audio );
49 extern int sub_justify; 50 extern int sub_justify;
50 51
51 // 2/c0: audio data 52 // 2/c0: audio data
199 mp_msg( MSGT_DEMUX, MSGL_DBG3, "Read bad\n" ); 200 mp_msg( MSGT_DEMUX, MSGL_DBG3, "Read bad\n" );
200 done = 1; 201 done = 1;
201 error = 1; 202 error = 1;
202 break; 203 break;
203 } 204 }
204 strlcpy( name, &header[ 0 ], 100 ); 205 av_strlcpy( name, &header[ 0 ], 100 );
205 strlcpy( sizestr, &header[ 124 ], 12 ); 206 av_strlcpy( sizestr, &header[ 124 ], 12 );
206 size = ty_octaltodecimal( sizestr ); 207 size = ty_octaltodecimal( sizestr );
207 208
208 blocks = size / 512; 209 blocks = size / 512;
209 if ( ( size % 512 ) > 0 ) blocks++; 210 if ( ( size % 512 ) > 0 ) blocks++;
210 skip = ( blocks + 1 ) * 512; 211 skip = ( blocks + 1 ) * 512;