On Wed, 6 Mar 2013 20:20:12 +0100, Janne Grunau <[email protected]> wrote: > On 2013-03-04 11:35:16 +0100, Anton Khirnov wrote: > > Take a Picture instead of AVFrame. > > > > It is needed because some fields from AVFrame printed by this function > > will be moved to Picture. > > --- > > libavcodec/h261dec.c | 2 +- > > libavcodec/h263dec.c | 3 ++- > > libavcodec/mpeg12.c | 4 ++-- > > libavcodec/mpegvideo.c | 6 ++++-- > > libavcodec/mpegvideo.h | 2 +- > > libavcodec/rv10.c | 3 ++- > > libavcodec/rv34.c | 4 ++-- > > libavcodec/vc1dec.c | 3 ++- > > 8 files changed, 16 insertions(+), 11 deletions(-) > > > > diff --git a/libavcodec/h261dec.c b/libavcodec/h261dec.c > > index 35d5002..904814b 100644 > > --- a/libavcodec/h261dec.c > > +++ b/libavcodec/h261dec.c > > @@ -625,7 +625,7 @@ assert(s->current_picture.f.pict_type == > > s->current_picture_ptr->f.pict_type); > > assert(s->current_picture.f.pict_type == s->pict_type); > > > > *pict = s->current_picture_ptr->f; > > - ff_print_debug_info(s, pict); > > + ff_print_debug_info(s, s->current_picture_ptr); > > > > *got_frame = 1; > > > > diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c > > index 663fe90..7ab9ed2 100644 > > --- a/libavcodec/h263dec.c > > +++ b/libavcodec/h263dec.c > > @@ -722,13 +722,14 @@ intrax8_decoded: > > assert(s->current_picture.f.pict_type == s->pict_type); > > if (s->pict_type == AV_PICTURE_TYPE_B || s->low_delay) { > > *pict = s->current_picture_ptr->f; > > + ff_print_debug_info(s, s->current_picture_ptr); > > } else if (s->last_picture_ptr != NULL) { > > *pict = s->last_picture_ptr->f; > > + ff_print_debug_info(s, s->last_picture_ptr); > > } > > > > if(s->last_picture_ptr || s->low_delay){ > > *got_frame = 1; > > - ff_print_debug_info(s, pict); > > } > > > > #ifdef PRINT_FRAME_TIME > > diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c > > index 4df51a2..bc71c91 100644 > > --- a/libavcodec/mpeg12.c > > +++ b/libavcodec/mpeg12.c > > @@ -1921,7 +1921,7 @@ static int slice_end(AVCodecContext *avctx, AVFrame > > *pict) > > > > if (s->pict_type == AV_PICTURE_TYPE_B || s->low_delay) { > > *pict = s->current_picture_ptr->f; > > - ff_print_debug_info(s, pict); > > + ff_print_debug_info(s, s->current_picture_ptr); > > } else { > > if (avctx->active_thread_type & FF_THREAD_FRAME) > > s->picture_number++; > > @@ -1929,7 +1929,7 @@ static int slice_end(AVCodecContext *avctx, AVFrame > > *pict) > > /* XXX: use another variable than picture_number */ > > if (s->last_picture_ptr != NULL) { > > *pict = s->last_picture_ptr->f; > > - ff_print_debug_info(s, pict); > > + ff_print_debug_info(s, s->last_picture_ptr); > > } > > } > > > > diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c > > index 9ddfa0d..5aa45d7 100644 > > --- a/libavcodec/mpegvideo.c > > +++ b/libavcodec/mpegvideo.c > > @@ -1803,10 +1803,12 @@ static void draw_arrow(uint8_t *buf, int sx, int > > sy, int ex, > > /** > > * Print debugging info for the given picture. > > */ > > -void ff_print_debug_info(MpegEncContext *s, AVFrame *pict) > > +void ff_print_debug_info(MpegEncContext *s, Picture *p) > > { > > - if (s->avctx->hwaccel || !pict || !pict->mb_type) > > + AVFrame *pict; > > + if (s->avctx->hwaccel || !p || !pict->mb_type) > > !pict->mb_type doesn't make any sense at this point, probably ok after > squashing, please check >
Right, it gets fixed in the mb_type moving patch -- Anton Khirnov _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
