Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static int our_get_buffer(struct AVCodecContext *c, AVFrame *pic)
- {
- int ret = avcodec_default_get_buffer(c, pic);
- int64_t *pts = (int64_t*)av_malloc(sizeof(int64_t));
- *pts = global_video_pkt_pts;
- pic->opaque = pts;
- return ret;
- }
- static void our_release_buffer(struct AVCodecContext *c, AVFrame *pic)
- {
- if(pic) av_freep(&pic->opaque);
- avcodec_default_release_buffer(c, pic);
- }
- static int our_get_buffer(struct AVCodecContext *c, AVFrame *pic)
- {
- int ret = avcodec_default_get_buffer(c, pic);
- int64_t *pts = (int64_t*)av_malloc(sizeof(int64_t));
- *pts = global_video_pkt_pts;
- pic->opaque = pts;
- return ret;
- }
- static void our_release_buffer(struct AVCodecContext *c, AVFrame *pic)
- {
- if(pic) av_freep(&pic->opaque);
- avcodec_default_release_buffer(c, pic);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement