# HG changeset patch # User reimar # Date 1400614173 0 # Node ID c0ab95217af31bb97b312315d42810a59a6126f5 # Parent 4e00eb3f4c76c7ddcd3168818417868d3edc5863 mencoder: warn if audio format changes. This is not handled in any way currently and will fail completely. diff -r 4e00eb3f4c76 -r c0ab95217af3 mencoder.c --- a/mencoder.c Tue May 20 19:29:31 2014 +0000 +++ b/mencoder.c Tue May 20 19:29:33 2014 +0000 @@ -282,9 +282,14 @@ int size=0; int at_eof=0; while(sizeMAX_OUTBURST) len=MAX_OUTBURST; - if (mp_decode_audio(sh_audio, len) < 0) + res = mp_decode_audio(sh_audio, len); + if (res == -2) + mp_msg(MSGT_MENCODER, MSGL_FATAL, "Audio format change detected!\n" + "MEncoder currently cannot handle format changes - patches welcome!\n"); + if (res < 0) at_eof = 1; if(len>sh_audio->a_out_buffer_len) len=sh_audio->a_out_buffer_len; fast_memcpy(buffer+size,sh_audio->a_out_buffer,len);