summaryrefslogtreecommitdiff
path: root/libavcodec/h263dec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2006-03-10 20:40:52 +0000
committerMichael Niedermayer <michaelni@gmx.at>2006-03-10 20:40:52 +0000
commit5430b070a85126da5905d4c0d3d1b1ef39c7042d (patch)
tree61e00bafb98404083cf84ac97118b76cf6a4fa09 /libavcodec/h263dec.c
parent003ebe100b9d9cd4ae32b16b38865714bfb6df44 (diff)
cleanup picture / debug output code
Originally committed as revision 5140 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h263dec.c')
-rw-r--r--libavcodec/h263dec.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c
index 91caa48e55..30303f8edf 100644
--- a/libavcodec/h263dec.c
+++ b/libavcodec/h263dec.c
@@ -766,22 +766,21 @@ retry:
assert(s->current_picture.pict_type == s->current_picture_ptr->pict_type);
assert(s->current_picture.pict_type == s->pict_type);
- if(s->pict_type==B_TYPE || s->low_delay){
- *pict= *(AVFrame*)&s->current_picture;
+ if (s->pict_type == B_TYPE || s->low_delay) {
+ *pict= *(AVFrame*)s->current_picture_ptr;
+ } else if (s->last_picture_ptr != NULL) {
+ *pict= *(AVFrame*)s->last_picture_ptr;
+ }
+
+ if(s->last_picture_ptr || s->low_delay){
+ *data_size = sizeof(AVFrame);
ff_print_debug_info(s, pict);
- } else {
- *pict= *(AVFrame*)&s->last_picture;
- if(pict)
- ff_print_debug_info(s, pict);
}
/* Return the Picture timestamp as the frame number */
/* we substract 1 because it is added on utils.c */
avctx->frame_number = s->picture_number - 1;
- /* don't output the last pic after seeking */
- if(s->last_picture_ptr || s->low_delay)
- *data_size = sizeof(AVFrame);
#ifdef PRINT_FRAME_TIME
av_log(avctx, AV_LOG_DEBUG, "%Ld\n", rdtsc()-time);
#endif