Hi, This is a code from "libavformat/flvdec.c":
static int flv_probe(AVProbeData *p) { const uint8_t *d; d = p->buf; if (d[0] == 'F' && d[1] == 'L' && d[2] == 'V' && d[3] < 5 && d[5]==0 && AV_RB32(d+5)>8) { return AVPROBE_SCORE_MAX; } return 0; } When I compile FFmpeg with -O2/-O3 options, FFmpeg doesn't recognize FLV files ("Unknown format"), but when I use -O1 everything works correctly. Here is asm output when I compile flvdec.c file with -O2: _flv_probe: clr.l d0 rts .even and here when I use -O1: _flv_probe: move.l 4(sp),a0 move.l 4(a0),a0 cmp.b #70,(a0) jne L3 cmp.b #76,1(a0) jne L4 cmp.b #86,2(a0) jne L5 cmp.b #4,3(a0) jhi L6 tst.b 5(a0) jne L7 move.l 5(a0),d0 moveq #8,d1 cmp.l d0,d1 jcs L8 clr.l d0 rts L3: clr.l d0 rts L4: clr.l d0 rts L5: clr.l d0 rts L6: clr.l d0 rts L7: clr.l d0 rts L8: moveq #100,d0 rts .even I attache proprocessed files + asm output in the archive. -- Summary: [m68k] Wrong code generated with -O2/-O3 Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: major Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: ami_stuff at o2 dot pl GCC host triplet: i686-cygwin GCC target triplet: m68k-amigaos http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42522