[SCM] libav/experimental: Change remaining ost->st->codec and ist->st->codec to enc and dec in do_audio_out().

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 17:15:57 UTC 2013


The following commit has been merged in the experimental branch:
commit 37f5a713de1ae1d6eadf8f62b140a3b5dbfdcb1f
Author: Justin Ruggles <justin.ruggles at gmail.com>
Date:   Sat Sep 18 20:16:56 2010 +0000

    Change remaining ost->st->codec and ist->st->codec to enc and dec in
    do_audio_out().
    
    Originally committed as revision 25143 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/ffmpeg.c b/ffmpeg.c
index da92581..e43e6fb 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -867,9 +867,9 @@ need_realloc:
 
     if(audio_sync_method){
         double delta = get_sync_ipts(ost) * enc->sample_rate - ost->sync_opts
-                - av_fifo_size(ost->fifo)/(ost->st->codec->channels * 2);
-        double idelta= delta*ist->st->codec->sample_rate / enc->sample_rate;
-        int byte_delta= ((int)idelta)*2*ist->st->codec->channels;
+                - av_fifo_size(ost->fifo)/(enc->channels * 2);
+        double idelta= delta*dec->sample_rate / enc->sample_rate;
+        int byte_delta= ((int)idelta)*2*enc->channels;
 
         //FIXME resample delay
         if(fabs(delta) > 50){
@@ -911,13 +911,13 @@ need_realloc:
         }
     }else
         ost->sync_opts= lrintf(get_sync_ipts(ost) * enc->sample_rate)
-                        - av_fifo_size(ost->fifo)/(ost->st->codec->channels * 2); //FIXME wrong
+                        - av_fifo_size(ost->fifo)/(enc->channels * 2); //FIXME wrong
 
     if (ost->audio_resample) {
         buftmp = audio_buf;
         size_out = audio_resample(ost->resample,
                                   (short *)buftmp, (short *)buf,
-                                  size / (ist->st->codec->channels * isize));
+                                  size / (dec->channels * isize));
         size_out = size_out * enc->channels * osize;
     } else {
         buftmp = buf;
@@ -972,7 +972,7 @@ need_realloc:
             if(enc->coded_frame && enc->coded_frame->pts != AV_NOPTS_VALUE)
                 pkt.pts= av_rescale_q(enc->coded_frame->pts, enc->time_base, ost->st->time_base);
             pkt.flags |= AV_PKT_FLAG_KEY;
-            write_frame(s, &pkt, ost->st->codec, bitstream_filters[ost->file_index][pkt.stream_index]);
+            write_frame(s, &pkt, enc, bitstream_filters[ost->file_index][pkt.stream_index]);
 
             ost->sync_opts += enc->frame_size;
         }
@@ -1007,7 +1007,7 @@ need_realloc:
         if(enc->coded_frame && enc->coded_frame->pts != AV_NOPTS_VALUE)
             pkt.pts= av_rescale_q(enc->coded_frame->pts, enc->time_base, ost->st->time_base);
         pkt.flags |= AV_PKT_FLAG_KEY;
-        write_frame(s, &pkt, ost->st->codec, bitstream_filters[ost->file_index][pkt.stream_index]);
+        write_frame(s, &pkt, enc, bitstream_filters[ost->file_index][pkt.stream_index]);
     }
 }
 

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list