[FFmpeg-devel] [PATCH]Add Dirac support to ffmpeg via libdirac_* and Schroedinger libraries]
Michael Niedermayer
michaelni
Fri May 2 19:05:20 CEST 2008
On Fri, May 02, 2008 at 05:34:27PM +0200, Luca Barbato wrote:
> Michael Niedermayer wrote:
>> [...]
>>> + int parse_info_found;
>> [...]
>>> + parse_info_found = pc->frame_start_found;
>> that local variable seems redundant
>
> Seems to me as well.
[...]
> + if (!pc->frame_start_found) {
> + for(i = 0; i < buf_size; i++) {
> + state = (state << 8) | buf[i];
> + if (state == DIRAC_PARSE_INFO_PREFIX) {
> + pc->frame_start_found = 1;
> + break;
> + }
> + }
> + }
> +
> + if (pc->frame_start_found) {
> + for(; i < buf_size; i++) {
> + state = (state << 8) | buf[i];
> + if (state == DIRAC_PARSE_INFO_PREFIX) {
> + pc->frame_start_found = 0;
> + pc->state = -1;
> + return i - 3;
> + }
> + }
> + }
for(i = 0; i < buf_size; i++) {
state = (state << 8) | buf[i];
if (state == DIRAC_PARSE_INFO_PREFIX) {
pc->frame_start_found ^= 1;
if(!pc->frame_start_found){
pc->state = -1;
return i - 3;
}
}
}
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
No great genius has ever existed without some touch of madness. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080502/671b0bf5/attachment.pgp>
More information about the ffmpeg-devel
mailing list