mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

73 lines
3.5 KiB

  1. # --- ROCK-COPYRIGHT-NOTE-BEGIN ---
  2. #
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. # Please add additional copyright information _after_ the line containing
  5. # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
  6. # the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
  7. #
  8. # ROCK Linux: rock-src/package/stf/avview/ffmpeg-0.4.9.patch
  9. # ROCK Linux is Copyright (C) 1998 - 2006 Clifford Wolf
  10. #
  11. # This patch file is dual-licensed. It is available under the license the
  12. # patched project is licensed under, as long as it is an OpenSource license
  13. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  14. # of the GNU General Public License as published by the Free Software
  15. # Foundation; either version 2 of the License, or (at your option) any later
  16. # version.
  17. #
  18. # --- ROCK-COPYRIGHT-NOTE-END ---
  19. --- avview-0.80.3/ffmpeg.c 2004-01-03 19:17:46.000000000 +0100
  20. +++ ./ffmpeg.c 2004-08-29 00:42:55.000000000 +0200
  21. @@ -578,7 +578,8 @@
  22. enc->frame_rate_base=FFMPEG_FRAME_RATE_BASE;
  23. enc->max_qdiff=3;
  24. -enc->aspect_ratio=0.0; /* guess assuming square pixels */
  25. +enc->sample_aspect_ratio.num=1; /* guess assuming square pixels */
  26. +enc->sample_aspect_ratio.den=1;
  27. enc->me_method=ME_FULL;
  28. enc->qblur=0.5;
  29. enc->qcompress=0.5;
  30. @@ -826,7 +826,7 @@
  31. sdata->format_context.pb.write_flag=1;
  32. sdata->format_context.pb.max_packet_size=0;
  33. sdata->format_context.oformat->flags=AVFMT_NOFILE;
  34. - sdata->format_context.flags=AVFMT_NOFILE;
  35. + sdata->format_context.ctx_flags=AVFMT_NOFILE;
  36. strcpy(sdata->format_context.title, arg_filename);
  37. /* no way to extract these from TV signal */
  38. sdata->format_context.title[0]=0;
  39. diff -dur avview-0.80.3/ffmpeg.c avview-0.80.3-patch/ffmpeg.c
  40. --- avview-0.80.3/ffmpeg.c 2004-08-29 01:13:34.000000000 +0200
  41. +++ avview-0.80.3-patch/ffmpeg.c 2004-08-29 01:11:16.000000000 +0200
  42. @@ -193,7 +193,13 @@
  43. while(ob_written<ob_free){
  44. pthread_mutex_lock(&(sdata->format_context_mutex));
  45. if(sdata->format_context.oformat!=NULL){
  46. - sdata->format_context.oformat->write_packet(&(sdata->format_context),sdata->video_stream_num, output_buf+ob_written, ob_free-ob_written, make_pts(start_ts, f->timestamp));
  47. + AVPacket packet;
  48. + packet.pts = make_pts(start_ts, f->timestamp);
  49. + packet.data = (uint8_t) output_buf;
  50. + packet.size = ob_size;
  51. + packet.duration = 0;
  52. + packet.stream_index = sdata->video_stream_num;
  53. + sdata->format_context.oformat->write_packet(&(sdata->format_context), &packet);
  54. i=ob_free-ob_written;
  55. } else {
  56. i=write(sdata->fd_out, output_buf+ob_written, ob_free-ob_written);
  57. @@ -324,7 +330,13 @@
  58. /* write output buffer */
  59. if(sdata->format_context.oformat!=NULL){
  60. /* write using libavcodec format output */
  61. - sdata->format_context.oformat->write_packet(&(sdata->format_context),sdata->audio_stream_num, out_buf, ob_free, make_pts(start_ts, f->timestamp));
  62. + AVPacket packet;
  63. + packet.pts = make_pts(start_ts, f->timestamp);
  64. + packet.data = (uint8_t) out_buf;
  65. + packet.size = ob_size;
  66. + packet.duration = 0;
  67. + packet.stream_index = sdata->audio_stream_num;
  68. + sdata->format_context.oformat->write_packet(&(sdata->format_context), &packet);
  69. } else {
  70. /* write using os function */
  71. os_write_packet(sdata->fd_out, out_buf, ob_free);