SHARE
TWEET

Untitled

a guest Mar 4th, 2016 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. diff -aur info-beamer/video.c info-beamer.patched/video.c
  2. --- info-beamer/video.c 2016-03-04 19:40:01.074477127 +0100
  3. +++ info-beamer.patched/video.c 2016-03-04 19:40:40.991262568 +0100
  4. @@ -64,9 +64,9 @@
  5.      if (video->scaler)
  6.          sws_freeContext(video->scaler);
  7.      if (video->raw_frame)
  8. -        av_free(video->raw_frame);
  9. +        av_frame_free(&video->raw_frame);
  10.      if (video->scaled_frame)
  11. -        av_free(video->scaled_frame);
  12. +        av_frame_free(&video->scaled_frame);
  13.  
  14.      if (video->codec_context)
  15.          avcodec_close(video->codec_context);
  16. @@ -78,7 +78,7 @@
  17.  
  18.  static int video_open(video_t *video, const char *filename) {
  19.      video->finished = 0;
  20. -    video->format = PIX_FMT_RGB24;
  21. +    video->format = AV_PIX_FMT_RGB24;
  22.  
  23.      if (avformat_open_input(&video->format_context, filename, NULL, NULL) ||
  24.              avformat_find_stream_info(video->format_context, NULL) < 0) {
  25. @@ -143,8 +143,8 @@
  26.      fprintf(stderr, INFO("fps: %lf\n"), video->fps);
  27.  
  28.      /* Get framebuffers */
  29. -    video->raw_frame = avcodec_alloc_frame();
  30. -    video->scaled_frame = avcodec_alloc_frame();
  31. +    video->raw_frame = av_frame_alloc();
  32. +    video->scaled_frame = av_frame_alloc();
  33.  
  34.      if (!video->raw_frame || !video->scaled_frame) {
  35.          fprintf(stderr, ERROR("cannot preallocate frames\n"));
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top