aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-08-08 10:48:36 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-08-08 10:49:23 +0200
commit1b2a5817fcd6bef184d6a32ddb62a9df1dd4fd0e (patch)
tree49add4f0735a5aed2e13f12ae8c4650e8c7f4de1
parenteb02f0c6e83386bf8a13ab8113e5d8cff9fa72d3 (diff)
parent22c879057ead189c0f59241cb9eeb926381e3299 (diff)
downloadffmpeg-1b2a5817fcd6bef184d6a32ddb62a9df1dd4fd0e.tar.gz
Merge commit '22c879057ead189c0f59241cb9eeb926381e3299'
* commit '22c879057ead189c0f59241cb9eeb926381e3299': mpegvideo_enc: drop outdated copy_picture_attributes() in favour of a modern av_frame_copy_props() Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/mpegvideo_enc.c23
1 files changed, 7 insertions, 16 deletions
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index cce5991fe4..2e6acb28a3 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -182,19 +182,6 @@ void ff_init_qscale_tab(MpegEncContext *s)
}
}
-static void copy_picture_attributes(MpegEncContext *s, AVFrame *dst,
- const AVFrame *src)
-{
- dst->pict_type = src->pict_type;
- dst->quality = src->quality;
- dst->coded_picture_number = src->coded_picture_number;
- dst->display_picture_number = src->display_picture_number;
- //dst->reference = src->reference;
- dst->pts = src->pts;
- dst->interlaced_frame = src->interlaced_frame;
- dst->top_field_first = src->top_field_first;
-}
-
static void update_duplicate_context_after_me(MpegEncContext *dst,
MpegEncContext *src)
{
@@ -1068,7 +1055,10 @@ static int load_input_picture(MpegEncContext *s, const AVFrame *pic_arg)
}
}
}
- copy_picture_attributes(s, &pic->f, pic_arg);
+ ret = av_frame_copy_props(&pic->f, pic_arg);
+ if (ret < 0)
+ return ret;
+
pic->f.display_picture_number = display_picture_number;
pic->f.pts = pts; // we set this here to avoid modifiying pic_arg
}
@@ -1408,8 +1398,9 @@ no_output_pic:
return -1;
}
- copy_picture_attributes(s, &pic->f,
- &s->reordered_input_picture[0]->f);
+ ret = av_frame_copy_props(&pic->f, &s->reordered_input_picture[0]->f);
+ if (ret < 0)
+ return ret;
/* mark us unused / free shared pic */
av_frame_unref(&s->reordered_input_picture[0]->f);