comparison mpeg.c @ 5321:a4a45f236eec libavformat

Improve sofdec dectection to avoid false positives for MP2. Patch by tralph11, tralph11 yahoo
author cehoyos
date Tue, 20 Oct 2009 15:27:05 +0000
parents 4277da592002
children 3e5fefc4b475
comparison
equal deleted inserted replaced
5320:db1e4c61789a 5321:a4a45f236eec
110 do { 110 do {
111 v = get_byte(s->pb); 111 v = get_byte(s->pb);
112 m->header_state = m->header_state << 8 | v; 112 m->header_state = m->header_state << 8 | v;
113 m->sofdec++; 113 m->sofdec++;
114 } while (v == sofdec[i] && i++ < 6); 114 } while (v == sofdec[i] && i++ < 6);
115
116 m->sofdec = (m->sofdec == 6) ? 1 : 0;
115 117
116 /* no need to do more */ 118 /* no need to do more */
117 return 0; 119 return 0;
118 } 120 }
119 121