# --- ROCK-COPYRIGHT-NOTE-BEGIN --- # # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # Please add additional copyright information _after_ the line containing # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by # the ./scripts/Create-CopyPatch script. Do not edit this copyright text! # # ROCK Linux: rock-src/package/stf/avview/ffmpeg-0.4.9.patch # ROCK Linux is Copyright (C) 1998 - 2006 Clifford Wolf # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at https://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or (at your option) any later # version. # # --- ROCK-COPYRIGHT-NOTE-END --- --- avview-0.80.3/ffmpeg.c 2004-01-03 19:17:46.000000000 +0100 +++ ./ffmpeg.c 2004-08-29 00:42:55.000000000 +0200 @@ -578,7 +578,8 @@ enc->frame_rate_base=FFMPEG_FRAME_RATE_BASE; enc->max_qdiff=3; -enc->aspect_ratio=0.0; /* guess assuming square pixels */ +enc->sample_aspect_ratio.num=1; /* guess assuming square pixels */ +enc->sample_aspect_ratio.den=1; enc->me_method=ME_FULL; enc->qblur=0.5; enc->qcompress=0.5; @@ -826,7 +826,7 @@ sdata->format_context.pb.write_flag=1; sdata->format_context.pb.max_packet_size=0; sdata->format_context.oformat->flags=AVFMT_NOFILE; - sdata->format_context.flags=AVFMT_NOFILE; + sdata->format_context.ctx_flags=AVFMT_NOFILE; strcpy(sdata->format_context.title, arg_filename); /* no way to extract these from TV signal */ sdata->format_context.title[0]=0; diff -dur avview-0.80.3/ffmpeg.c avview-0.80.3-patch/ffmpeg.c --- avview-0.80.3/ffmpeg.c 2004-08-29 01:13:34.000000000 +0200 +++ avview-0.80.3-patch/ffmpeg.c 2004-08-29 01:11:16.000000000 +0200 @@ -193,7 +193,13 @@ while(ob_writtenformat_context_mutex)); if(sdata->format_context.oformat!=NULL){ - 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)); + AVPacket packet; + packet.pts = make_pts(start_ts, f->timestamp); + packet.data = (uint8_t) output_buf; + packet.size = ob_size; + packet.duration = 0; + packet.stream_index = sdata->video_stream_num; + sdata->format_context.oformat->write_packet(&(sdata->format_context), &packet); i=ob_free-ob_written; } else { i=write(sdata->fd_out, output_buf+ob_written, ob_free-ob_written); @@ -324,7 +330,13 @@ /* write output buffer */ if(sdata->format_context.oformat!=NULL){ /* write using libavcodec format output */ - sdata->format_context.oformat->write_packet(&(sdata->format_context),sdata->audio_stream_num, out_buf, ob_free, make_pts(start_ts, f->timestamp)); + AVPacket packet; + packet.pts = make_pts(start_ts, f->timestamp); + packet.data = (uint8_t) out_buf; + packet.size = ob_size; + packet.duration = 0; + packet.stream_index = sdata->audio_stream_num; + sdata->format_context.oformat->write_packet(&(sdata->format_context), &packet); } else { /* write using os function */ os_write_packet(sdata->fd_out, out_buf, ob_free);