diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2006-03-10 20:40:52 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2006-03-10 20:40:52 +0000 |
commit | 5430b070a85126da5905d4c0d3d1b1ef39c7042d (patch) | |
tree | 61e00bafb98404083cf84ac97118b76cf6a4fa09 /libavcodec/rv10.c | |
parent | 003ebe100b9d9cd4ae32b16b38865714bfb6df44 (diff) | |
download | ffmpeg-5430b070a85126da5905d4c0d3d1b1ef39c7042d.tar.gz |
cleanup picture / debug output code
Originally committed as revision 5140 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/rv10.c')
-rw-r--r-- | libavcodec/rv10.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/libavcodec/rv10.c b/libavcodec/rv10.c index 0b90cc2c18..d48e0df2f0 100644 --- a/libavcodec/rv10.c +++ b/libavcodec/rv10.c @@ -741,15 +741,16 @@ static int rv10_decode_frame(AVCodecContext *avctx, ff_er_frame_end(s); MPV_frame_end(s); - if(s->pict_type==B_TYPE || s->low_delay){ - *pict= *(AVFrame*)&s->current_picture; - ff_print_debug_info(s, pict); - } else { - *pict= *(AVFrame*)&s->last_picture; - ff_print_debug_info(s, pict); + 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) + + if(s->last_picture_ptr || s->low_delay){ *data_size = sizeof(AVFrame); + ff_print_debug_info(s, pict); + } s->current_picture_ptr= NULL; //so we can detect if frame_end wasnt called (find some nicer solution...) } |