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.

54 lines
2.6 KiB

  1. --- avview-0.80.3/ffmpeg.c 2004-01-03 19:17:46.000000000 +0100
  2. +++ ./ffmpeg.c 2004-08-29 00:42:55.000000000 +0200
  3. @@ -578,7 +578,8 @@
  4. enc->frame_rate_base=FFMPEG_FRAME_RATE_BASE;
  5. enc->max_qdiff=3;
  6. -enc->aspect_ratio=0.0; /* guess assuming square pixels */
  7. +enc->sample_aspect_ratio.num=1; /* guess assuming square pixels */
  8. +enc->sample_aspect_ratio.den=1;
  9. enc->me_method=ME_FULL;
  10. enc->qblur=0.5;
  11. enc->qcompress=0.5;
  12. @@ -826,7 +826,7 @@
  13. sdata->format_context.pb.write_flag=1;
  14. sdata->format_context.pb.max_packet_size=0;
  15. sdata->format_context.oformat->flags=AVFMT_NOFILE;
  16. - sdata->format_context.flags=AVFMT_NOFILE;
  17. + sdata->format_context.ctx_flags=AVFMT_NOFILE;
  18. strcpy(sdata->format_context.title, arg_filename);
  19. /* no way to extract these from TV signal */
  20. sdata->format_context.title[0]=0;
  21. diff -dur avview-0.80.3/ffmpeg.c avview-0.80.3-patch/ffmpeg.c
  22. --- avview-0.80.3/ffmpeg.c 2004-08-29 01:13:34.000000000 +0200
  23. +++ avview-0.80.3-patch/ffmpeg.c 2004-08-29 01:11:16.000000000 +0200
  24. @@ -193,7 +193,13 @@
  25. while(ob_written<ob_free){
  26. pthread_mutex_lock(&(sdata->format_context_mutex));
  27. if(sdata->format_context.oformat!=NULL){
  28. - 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));
  29. + AVPacket packet;
  30. + packet.pts = make_pts(start_ts, f->timestamp);
  31. + packet.data = (uint8_t) output_buf;
  32. + packet.size = ob_size;
  33. + packet.duration = 0;
  34. + packet.stream_index = sdata->video_stream_num;
  35. + sdata->format_context.oformat->write_packet(&(sdata->format_context), &packet);
  36. i=ob_free-ob_written;
  37. } else {
  38. i=write(sdata->fd_out, output_buf+ob_written, ob_free-ob_written);
  39. @@ -324,7 +330,13 @@
  40. /* write output buffer */
  41. if(sdata->format_context.oformat!=NULL){
  42. /* write using libavcodec format output */
  43. - sdata->format_context.oformat->write_packet(&(sdata->format_context),sdata->audio_stream_num, out_buf, ob_free, make_pts(start_ts, f->timestamp));
  44. + AVPacket packet;
  45. + packet.pts = make_pts(start_ts, f->timestamp);
  46. + packet.data = (uint8_t) out_buf;
  47. + packet.size = ob_size;
  48. + packet.duration = 0;
  49. + packet.stream_index = sdata->audio_stream_num;
  50. + sdata->format_context.oformat->write_packet(&(sdata->format_context), &packet);
  51. } else {
  52. /* write using os function */
  53. os_write_packet(sdata->fd_out, out_buf, ob_free);