$NetBSD: patch-ac,v 1.2 2005/05/23 08:50:36 rillig Exp $ --- ffmpeg-strip-wma/asf.c.orig Wed May 26 19:16:39 2004 +++ ffmpeg-strip-wma/asf.c Sat Dec 11 21:32:58 2004 @@ -16,10 +16,13 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#ifdef USE_ICONV +#include +#endif + #include "avformat.h" #include "avi.h" -//#include "mpegaudio.h" -#include #undef NDEBUG #include @@ -830,6 +833,7 @@ return str; } +#ifdef USE_ICONV static void tag_recode(char *before, int len) { int result; @@ -859,6 +863,7 @@ return; return; } +#endif static void get_str16_nolen(ByteIOContext *pb, int len, char *buf, int buf_size) { @@ -868,12 +873,17 @@ q = buf; lenz = len; while (len > 0) { - c = get_byte(pb); - if ((q - buf) < buf_size-1) - *q++ = c; - len--; + c = get_byte(pb); + if ((q - buf) < buf_size - 1) + *q++ = c; + len--; } - tag_recode(buf, lenz); + +#ifdef USE_ICONV + tag_recode(buf, lenz); +#else + *q = '\0'; +#endif } static int asf_probe(AVProbeData *pd)