Guest User

Untitled

a guest
Jan 15th, 2010
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.01 KB | None | 0 0
  1. Index: configure
  2. ===================================================================
  3. --- configure (リビジョン 21225)
  4. +++ configure (作業コピー)
  5. @@ -1851,7 +1851,7 @@
  6. fi
  7.  
  8. add_cppflags -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112
  9. -check_cflags -std=c99
  10. +check_cflags -std=gnu99
  11. check_cc -D_FILE_OFFSET_BITS=64 <<EOF && add_cppflags -D_FILE_OFFSET_BITS=64
  12. #include <stdlib.h>
  13. EOF
  14. @@ -2379,6 +2379,9 @@
  15. add_extralibs -pthreads
  16. elif check_func pthread_create -lpthreadGC2; then
  17. add_extralibs -lpthreadGC2
  18. + elif check_func pthread_create -lpthreadGC2 -lws2_32; then
  19. + add_cflags -DPTW32_STATIC_LIB
  20. + add_extralibs -lpthreadGC2 -lws2_32
  21. elif ! check_lib pthread.h pthread_create -lpthread; then
  22. die "ERROR: can't find pthreads library"
  23. fi
  24. @@ -2424,10 +2427,10 @@
  25. enabled libspeex && require libspeex speex/speex.h speex_decoder_init -lspeex
  26. enabled libtheora && require libtheora theora/theoraenc.h th_info_init -ltheoraenc -ltheoradec -logg
  27. enabled libvorbis && require libvorbis vorbis/vorbisenc.h vorbis_info_init -lvorbisenc -lvorbis -logg
  28. -enabled libx264 && require libx264 x264.h x264_encoder_encode -lx264 -lm &&
  29. +enabled libx264 && require libx264 x264.h x264_encoder_encode -lx264 -lm -lpthreadGC2 -lws2_32 &&
  30. { check_cpp_condition x264.h "X264_BUILD >= 79" ||
  31. die "ERROR: libx264 version must be >= 0.79."; }
  32. -enabled libxvid && require libxvid xvid.h xvid_global -lxvidcore
  33. +enabled libxvid && require libxvid xvid.h xvid_global -lxvidcore -lpthreadGC2 -lws2_32
  34. enabled mlib && require mediaLib mlib_types.h mlib_VectorSub_S16_U8_Mod -lmlib
  35.  
  36. # libdc1394 check
  37. Index: ffmpeg.c
  38. ===================================================================
  39. --- ffmpeg.c (&#12522;&#12499;&#12472;&#12519;&#12531; 21225)
  40. +++ ffmpeg.c (&#20316;&#26989;&#12467;&#12500;&#12540;)
  41. @@ -50,6 +50,7 @@
  42.  
  43. #if HAVE_SYS_SELECT_H
  44. #include <sys/select.h>
  45. +#define usleep(t) Sleep((t) / 1000)
  46. #endif
  47.  
  48. #if HAVE_TERMIOS_H
  49. Index: libavcodec/opt.c
  50. ===================================================================
  51. --- libavcodec/opt.c (&#12522;&#12499;&#12472;&#12519;&#12531; 21225)
  52. +++ libavcodec/opt.c (&#20316;&#26989;&#12467;&#12500;&#12540;)
  53. @@ -175,6 +175,7 @@
  54. if(o->type == FF_OPT_TYPE_FLAGS){
  55. if (cmd=='+') d= av_get_int(obj, name, NULL) | (int64_t)d;
  56. else if(cmd=='-') d= av_get_int(obj, name, NULL) &~(int64_t)d;
  57. + else if(buf[0]=='0' && buf[1]=='x') d= strtoul(buf, NULL, 16);
  58. }else{
  59. if (cmd=='+') d= notfirst*av_get_double(obj, name, NULL) + d;
  60. else if(cmd=='-') d= notfirst*av_get_double(obj, name, NULL) - d;
  61. Index: libavcodec/libmp3lame.c
  62. ===================================================================
  63. --- libavcodec/libmp3lame.c (&#12522;&#12499;&#12472;&#12519;&#12531; 21225)
  64. +++ libavcodec/libmp3lame.c (&#20316;&#26989;&#12467;&#12500;&#12540;)
  65. @@ -34,6 +34,7 @@
  66. int stereo;
  67. uint8_t buffer[BUFFER_SIZE];
  68. int buffer_index;
  69. + int buffer_flushed;
  70. } Mp3AudioContext;
  71.  
  72. static av_cold int MP3lame_encode_init(AVCodecContext *avctx)
  73. @@ -73,6 +74,8 @@
  74. avctx->coded_frame= avcodec_alloc_frame();
  75. avctx->coded_frame->key_frame= 1;
  76.  
  77. + s->buffer_flushed = 0;
  78. +
  79. return 0;
  80.  
  81. err_close:
  82. @@ -166,13 +169,15 @@
  83. BUFFER_SIZE - s->buffer_index
  84. );
  85. }
  86. - }else{
  87. + }else if (data == NULL && s->buffer_flushed == 0){
  88. lame_result= lame_encode_flush(
  89. s->gfp,
  90. s->buffer + s->buffer_index,
  91. BUFFER_SIZE - s->buffer_index
  92. );
  93. - }
  94. + s->buffer_flushed = 1;
  95. + }else
  96. + lame_result = 0;
  97.  
  98. if(lame_result < 0){
  99. if(lame_result==-1) {
  100. Index: libavformat/rmdec.c
  101. ===================================================================
  102. --- libavformat/rmdec.c (&#12522;&#12499;&#12472;&#12519;&#12531; 21225)
  103. +++ libavformat/rmdec.c (&#20316;&#26989;&#12467;&#12500;&#12540;)
  104. @@ -315,17 +315,17 @@
  105. st->codec->width = get_be16(pb);
  106. st->codec->height = get_be16(pb);
  107. st->codec->time_base.num= 1;
  108. - fps= get_be16(pb);
  109. + fps = get_be16(pb);
  110. st->codec->codec_type = CODEC_TYPE_VIDEO;
  111. get_be32(pb);
  112. - fps2= get_be16(pb);
  113. + fps2 = get_be16(pb);
  114. get_be16(pb);
  115.  
  116. if ((ret = rm_read_extradata(pb, st->codec, codec_data_size - (url_ftell(pb) - codec_pos))) < 0)
  117. return ret;
  118.  
  119. // av_log(s, AV_LOG_DEBUG, "fps= %d fps2= %d\n", fps, fps2);
  120. - st->codec->time_base.den = fps * st->codec->time_base.num;
  121. + st->codec->time_base.den = fps2 * st->codec->time_base.num;
  122. //XXX: do we really need that?
  123. switch(st->codec->extradata[4]>>4){
  124. case 1: st->codec->codec_id = CODEC_ID_RV10; break;
  125.  
Advertisement
Add Comment
Please, Sign In to add comment