diff --git a/libavcodec/internal.h b/libavcodec/internal.h
index 3402cc254793dec48c53a9924db97544d5d7d1e6..14f7918dbda6785e7cfcf6275bb58dbd9feca19c 100644
--- a/libavcodec/internal.h
+++ b/libavcodec/internal.h
@@ -213,4 +213,6 @@ int ff_codec_close_recursive(AVCodecContext *avctx);
  */
 int avpriv_bprint_to_extradata(AVCodecContext *avctx, struct AVBPrint *buf);
 
+AVDictionary **ff_frame_get_metadatap(AVFrame *frame);
+
 #endif /* AVCODEC_INTERNAL_H */
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index e364b7e991236f31f7e6b2b1719581f3b359205d..69aaf4df8bed3c150f1c3aaa9aa28d9261adb4f0 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -767,6 +767,8 @@ MAKE_ACCESSORS(AVFrame, frame, AVDictionary *, metadata)
 MAKE_ACCESSORS(AVFrame, frame, int,     decode_error_flags)
 MAKE_ACCESSORS(AVFrame, frame, int,     pkt_size)
 
+AVDictionary **ff_frame_get_metadatap(AVFrame *frame) {return &frame->metadata;};
+
 MAKE_ACCESSORS(AVCodecContext, codec, AVRational, pkt_timebase)
 MAKE_ACCESSORS(AVCodecContext, codec, const AVCodecDescriptor *, codec_descriptor)