]> git.pld-linux.org Git - packages/sox.git/blob - sox-ffmpeg.patch
- release 5
[packages/sox.git] / sox-ffmpeg.patch
1 Index: sox-14.3.2/src/ffmpeg.c
2 ===================================================================
3 --- sox-14.3.2.orig/src/ffmpeg.c
4 +++ sox-14.3.2/src/ffmpeg.c
5 @@ -91,7 +91,7 @@ static int stream_component_open(priv_t
6  
7    if (!codec || avcodec_open(enc, codec) < 0)
8      return -1;
9 -  if (enc->codec_type != CODEC_TYPE_AUDIO) {
10 +  if (enc->codec_type != AVMEDIA_TYPE_AUDIO) {
11      lsx_fail("ffmpeg CODEC %x is not an audio CODEC", enc->codec_type);
12      return -1;
13    }
14 @@ -182,7 +182,7 @@ static int startread(sox_format_t * ft)
15    /* Find audio stream (FIXME: allow different stream to be selected) */
16    for (i = 0; (unsigned)i < ffmpeg->ctxt->nb_streams; i++) {
17      AVCodecContext *enc = ffmpeg->ctxt->streams[i]->codec;
18 -    if (enc->codec_type == CODEC_TYPE_AUDIO && ffmpeg->audio_index < 0) {
19 +    if (enc->codec_type == AVMEDIA_TYPE_AUDIO && ffmpeg->audio_index < 0) {
20        ffmpeg->audio_index = i;
21        break;
22      }
23 @@ -273,7 +273,7 @@ static AVStream *add_audio_stream(sox_fo
24  
25    c = st->codec;
26    c->codec_id = codec_id;
27 -  c->codec_type = CODEC_TYPE_AUDIO;
28 +  c->codec_type = AVMEDIA_TYPE_AUDIO;
29  
30    /* put sample parameters */
31    c->bit_rate = 256000;  /* FIXME: allow specification */
32 @@ -423,7 +423,7 @@ static size_t write_samples(sox_format_t
33        av_init_packet(&pkt);
34        pkt.size = avcodec_encode_audio(c, ffmpeg->audio_buf_aligned, AVCODEC_MAX_AUDIO_FRAME_SIZE, ffmpeg->samples);
35        pkt.pts = av_rescale_q(c->coded_frame->pts, c->time_base, ffmpeg->audio_st->time_base);
36 -      pkt.flags |= PKT_FLAG_KEY;
37 +      pkt.flags |= AV_PKT_FLAG_KEY;
38        pkt.stream_index = ffmpeg->audio_st->index;
39        pkt.data = ffmpeg->audio_buf_aligned;
This page took 0.056546 seconds and 3 git commands to generate.