comparison mpeg12.c @ 1372:b52e62d17bbb libavcodec

last frame decoding fix
author michaelni
date Wed, 23 Jul 2003 09:58:02 +0000
parents 45d761c387cd
children 5d2435fb733d
comparison
equal deleted inserted replaced
1371:a0c0bee12abf 1372:b52e62d17bbb
2229 dprintf("fill_buffer\n"); 2229 dprintf("fill_buffer\n");
2230 2230
2231 *data_size = 0; 2231 *data_size = 0;
2232 2232
2233 /* special case for last picture */ 2233 /* special case for last picture */
2234 if (buf_size == 0) { 2234 if (buf_size == 0 && s2->low_delay==0 && s2->next_picture_ptr) {
2235 if (s2->picture_number > 0) { 2235 *picture= *(AVFrame*)s2->next_picture_ptr;
2236 *picture= *(AVFrame*)&s2->next_picture; 2236 s2->next_picture_ptr= NULL;
2237 2237
2238 *data_size = sizeof(AVFrame); 2238 *data_size = sizeof(AVFrame);
2239 }
2240 return 0; 2239 return 0;
2241 } 2240 }
2242 2241
2243 if(s2->flags&CODEC_FLAG_TRUNCATED){ 2242 if(s2->flags&CODEC_FLAG_TRUNCATED){
2244 int next= mpeg1_find_frame_end(s2, buf, buf_size); 2243 int next= mpeg1_find_frame_end(s2, buf, buf_size);