19 |
* along with this program; if not, write to the Free Software |
* along with this program; if not, write to the Free Software |
20 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
21 |
* |
* |
22 |
* $Id: decoder.c,v 1.49.2.2 2003-03-16 12:04:13 suxen_drol Exp $ |
* $Id: decoder.c,v 1.49.2.3 2003-03-26 10:29:51 suxen_drol Exp $ |
23 |
* |
* |
24 |
****************************************************************************/ |
****************************************************************************/ |
25 |
|
|
1754 |
|
|
1755 |
if (frame->length < 0) /* decoder flush */ |
if (frame->length < 0) /* decoder flush */ |
1756 |
{ |
{ |
1757 |
|
int ret; |
1758 |
/* if not decoding "low_delay/packed", and this isn't low_delay and |
/* if not decoding "low_delay/packed", and this isn't low_delay and |
1759 |
we have a reference frame, then outout the reference frame */ |
we have a reference frame, then outout the reference frame */ |
1760 |
if (!(dec->low_delay_default && dec->packed_mode) && !dec->low_delay && dec->frames>0) |
if (!(dec->low_delay_default && dec->packed_mode) && !dec->low_delay && dec->frames>0) { |
|
{ |
|
1761 |
decoder_output(dec, &dec->refn[0], dec->last_mbs, frame, stats, dec->last_coding_type); |
decoder_output(dec, &dec->refn[0], dec->last_mbs, frame, stats, dec->last_coding_type); |
1762 |
|
dec->frames = 0; |
1763 |
|
ret = 0; |
1764 |
}else{ |
}else{ |
1765 |
if (stats) stats->type = XVID_TYPE_NOTHING; |
if (stats) stats->type = XVID_TYPE_NOTHING; |
1766 |
|
ret = XVID_ERR_END; |
1767 |
} |
} |
1768 |
|
|
1769 |
emms(); |
emms(); |
1770 |
stop_global_timer(); |
stop_global_timer(); |
1771 |
return 0; |
return ret; |
1772 |
} |
} |
1773 |
|
|
1774 |
BitstreamInit(&bs, frame->bitstream, frame->length); |
BitstreamInit(&bs, frame->bitstream, frame->length); |