Guest User

Untitled

a guest
Feb 22nd, 2013
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.68 KB | None | 0 0
  1. 27c27,29
  2. < #undef malloc // Shut up libav error messages.
  3. ---
  4. >
  5. > // Shut up libav error messages.
  6. > #undef malloc
  7. 38d39
  8. < #include <pthread.h>
  9. 40,44c41,45
  10. < #if defined (__APPLE__)
  11. < #define AVISYNTH_LIB "libavxsynth.dylib"
  12. < #else
  13. < #define AVISYNTH_LIB "libavxsynth.so"
  14. < #endif
  15. ---
  16. > #if defined (__APPLE__)
  17. > #define AVISYNTH_LIB "libavxsynth.dylib"
  18. > #else
  19. > #define AVISYNTH_LIB "libavxsynth.so"
  20. > #endif
  21. 91c92
  22. < static const int avs_planes_yuv[3] = {AVS_PLANAR_Y, AVS_PLANAR_V, AVS_PLANAR_U};
  23. ---
  24. > static const int avs_planes_yuv[3] = {AVS_PLANAR_Y, AVS_PLANAR_U, AVS_PLANAR_V};
  25. 185c186
  26. < int planar = 0; // 0: packed, 1: YUV, 2: Y8
  27. ---
  28. > int planar = 0; // 0: packed, 1: YUV, 2: Y8, 3: YVU
  29. 199c200
  30. < #ifdef _WIN32
  31. ---
  32. > #if 0
  33. 370,374c371,374
  34. < if ( avs_is_rgb24(avs->vi) || avs_is_rgb32(avs->vi) ) {
  35. < src_p = (src_p + (planeheight - 1) * pitch);
  36. < avs_library->avs_bit_blt(avs->env, dst_p, rowsize, src_p, -pitch, rowsize, planeheight);
  37. < } else {
  38. < avs_library->avs_bit_blt(avs->env, dst_p, rowsize, src_p, pitch, rowsize, planeheight);
  39. ---
  40. > // Flip RGB video.
  41. > if (avs_is_rgb24(avs->vi) || avs_is_rgb(avs->vi)) {
  42. > src_p = src_p + (planeheight - 1) * pitch;
  43. > pitch = -pitch;
  44. 375a376,377
  45. >
  46. > avs_library->avs_bit_blt(avs->env, dst_p, rowsize, src_p, pitch, rowsize, planeheight);
  47. 402,403c404
  48. < }
  49. < else
  50. ---
  51. > } else {
  52. 404a406
  53. > }
  54. 406,407d407
  55. < if (samples <= 0)
  56. < return 0;
  57. 410a411,417
  58. > // After seeking, audio may catch up with video.
  59. > if (samples <= 0) {
  60. > pkt->size = 0;
  61. > pkt->data = NULL;
  62. > return 0;
  63. > }
  64. >
  65. 486d492
  66. < AVS_ScriptEnvironment *env = NULL;
  67. 492c498
  68. < avs_library->avs_delete_script_environment(env);
  69. ---
  70. > avs_library->avs_delete_script_environment(avs->env);
  71. 506a513,515
  72. > avs->curr_frame = 0;
  73. > avs->curr_sample = 0;
  74. >
  75. 518c527,528
  76. < avs->curr_sample = av_rescale_q(timestamp, samplerate, fps);
  77. ---
  78. > if (avs_has_audio(avs->vi))
  79. > avs->curr_sample = av_rescale_q(timestamp, samplerate, fps);
  80. 523,524c533,538
  81. < avs->curr_frame = av_rescale_q(timestamp, fps, samplerate);
  82. < avs->curr_sample = av_rescale_q(avs->curr_frame, samplerate, fps);
  83. ---
  84. > if (avs_has_video(avs->vi)) {
  85. > avs->curr_frame = av_rescale_q(timestamp, fps, samplerate);
  86. > avs->curr_sample = av_rescale_q(avs->curr_frame, samplerate, fps);
  87. > } else {
  88. > avs->curr_sample = timestamp;
  89. > }
  90. 539c553
  91. < };
  92. \ No newline at end of file
  93. ---
  94. > };
Advertisement
Add Comment
Please, Sign In to add comment