summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'media-sound/gnusound/files/gnusound-0.7.4-ffmpeg-struct.patch')
-rw-r--r--media-sound/gnusound/files/gnusound-0.7.4-ffmpeg-struct.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/media-sound/gnusound/files/gnusound-0.7.4-ffmpeg-struct.patch b/media-sound/gnusound/files/gnusound-0.7.4-ffmpeg-struct.patch
new file mode 100644
index 000000000000..a546292a8ef3
--- /dev/null
+++ b/media-sound/gnusound/files/gnusound-0.7.4-ffmpeg-struct.patch
@@ -0,0 +1,41 @@
+Index: modules/file_ffmpeg.c
+===================================================================
+--- modules/file_ffmpeg.c
++++ modules/file_ffmpeg.c 2006-07-26 23:50:11.721445982 +0200
+@@ -146,7 +146,7 @@
+ return cmd_new_error_val("Could not open audio stream");
+ }
+
+- codec = avcodec_find_decoder(fc->streams[audio_index]->codec.codec_id);
++ codec = avcodec_find_decoder(fc->streams[audio_index]->codec->codec_id);
+ snprintf(ffmpeg_data->format_name, sizeof(ffmpeg_data->format_name),
+ "%s/%s", fc->iformat->name, codec->name);
+
+@@ -155,8 +155,8 @@
+ ffmpeg_data->audio_stream = fc->streams[audio_index];
+
+ params->sample_type = SAMPLE_TYPE_INT_16;
+- params->sample_rate = ffmpeg_data->audio_stream->codec.sample_rate;
+- params->channels = ffmpeg_data->audio_stream->codec.channels;
++ params->sample_rate = ffmpeg_data->audio_stream->codec->sample_rate;
++ params->channels = ffmpeg_data->audio_stream->codec->channels;
+ params->frame_count = -1;
+
+ av_read_play(fc);
+@@ -274,14 +274,14 @@
+ * could save a memcpy() here, but this is cleaner.
+ */
+
+- copied = MIN(count * ffmpeg_data->audio_stream->codec.channels * 2,
++ copied = MIN(count * ffmpeg_data->audio_stream->codec->channels * 2,
+ ffmpeg_data->decode_buf_avail);
+ memcpy(buf, ffmpeg_data->decode_buf + ffmpeg_data->decode_buf_offset,
+ copied);
+ ffmpeg_data->decode_buf_offset += copied;
+ ffmpeg_data->decode_buf_avail -= copied;
+
+- return copied / (ffmpeg_data->audio_stream->codec.channels * 2);
++ return copied / (ffmpeg_data->audio_stream->codec->channels * 2);
+ }
+
+ static long