diff options
author | wm4 <wm4@nowhere> | 2017-01-25 08:24:19 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2017-01-25 08:24:19 +0100 |
commit | 801fa486b0b43badd05cbab64d796b3eb5a2d129 (patch) | |
tree | 15c9b086a51d50fadb7d03e52e81632907848b42 /common/av_common.h | |
parent | ce803da90d432cef7befa3eee3b359e14cdacccb (diff) | |
download | mpv-801fa486b0b43badd05cbab64d796b3eb5a2d129.tar.bz2 mpv-801fa486b0b43badd05cbab64d796b3eb5a2d129.tar.xz |
ad_lavc, vd_lavc: move mpv->lavc decoder parameter setup to common code
This can be useful in other contexts.
Note that we end up setting AVCodecContext.width/height instead of
coded_width/coded_height now. AVCodecParameters can't set coded_width,
but this is probably more correct anyway.
Diffstat (limited to 'common/av_common.h')
-rw-r--r-- | common/av_common.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/common/av_common.h b/common/av_common.h index 553c01a931..1d30fab71f 100644 --- a/common/av_common.h +++ b/common/av_common.h @@ -31,7 +31,9 @@ struct AVDictionary; struct mp_log; int mp_lavc_set_extradata(AVCodecContext *avctx, void *ptr, int size); -void mp_set_lav_codec_headers(AVCodecContext *avctx, struct mp_codec_params *c); +enum AVMediaType mp_to_av_stream_type(int type); +AVCodecParameters *mp_codec_params_to_av(struct mp_codec_params *c); +int mp_set_avctx_codec_headers(AVCodecContext *avctx, struct mp_codec_params *c); AVRational mp_get_codec_timebase(struct mp_codec_params *c); void mp_set_av_packet(AVPacket *dst, struct demux_packet *mpkt, AVRational *tb); int64_t mp_pts_to_av(double mp_pts, AVRational *tb); |