[FFmpeg-soc] [soc]: r5083 - concat/ffmpeg.c.diff

gkovacs subversion at mplayerhq.hu
Thu Aug 13 21:37:15 CEST 2009


Author: gkovacs
Date: Thu Aug 13 21:37:15 2009
New Revision: 5083

Log:
removed unnecessary decoding loops in output_packets

Modified:
   concat/ffmpeg.c.diff

Modified: concat/ffmpeg.c.diff
==============================================================================
--- concat/ffmpeg.c.diff	Thu Aug 13 21:28:01 2009	(r5082)
+++ concat/ffmpeg.c.diff	Thu Aug 13 21:37:15 2009	(r5083)
@@ -1,5 +1,5 @@
 diff --git a/ffmpeg.c b/ffmpeg.c
-index e899180..289bfa2 100644
+index e899180..87a23a0 100644
 --- a/ffmpeg.c
 +++ b/ffmpeg.c
 @@ -40,6 +40,7 @@
@@ -36,36 +36,15 @@ index e899180..289bfa2 100644
      if(ist->next_pts == AV_NOPTS_VALUE)
          ist->next_pts= ist->pts;
  
-@@ -1292,6 +1301,15 @@ static int output_packet(AVInputStream *ist, int ist_index,
+@@ -1292,6 +1301,7 @@ static int output_packet(AVInputStream *ist, int ist_index,
                         endianness as CPU */
                  ret = avcodec_decode_audio3(ist->st->codec, samples, &data_size,
                                              &avpkt);
 +
-+
-+                ist->st = is->streams[avpkt.stream_index];
-+
-+                    while (ret < 0)
-+                        ret = ist->st->codec->codec->decode(ist->st->codec, samples, &data_size,
-+                                            &avpkt);
-+
-+
                  if (ret < 0)
                      goto fail_decode;
                  avpkt.data += ret;
-@@ -1314,6 +1332,12 @@ static int output_packet(AVInputStream *ist, int ist_index,
-                     ret = avcodec_decode_video2(ist->st->codec,
-                                                 &picture, &got_picture, &avpkt);
-                     ist->st->quality= picture.quality;
-+
-+                    ist->st = is->streams[avpkt.stream_index];
-+
-+                    while (ret < 0)
-+                        ret = ist->st->codec->codec->decode(ist->st->codec,
-+                                                &picture, &got_picture, &avpkt);
-                     if (ret < 0)
-                         goto fail_decode;
-                     if (!got_picture) {
-@@ -1398,7 +1422,7 @@ static int output_packet(AVInputStream *ist, int ist_index,
+@@ -1398,7 +1408,7 @@ static int output_packet(AVInputStream *ist, int ist_index,
                  int frame_size;
  
                  ost = ost_table[i];
@@ -74,7 +53,7 @@ index e899180..289bfa2 100644
                      os = output_files[ost->file_index];
  
  #if 0
-@@ -2156,6 +2180,8 @@ static int av_encode(AVFormatContext **output_files,
+@@ -2156,6 +2166,8 @@ static int av_encode(AVFormatContext **output_files,
          AVPacket pkt;
          double ipts_min;
          double opts_min;
@@ -83,7 +62,7 @@ index e899180..289bfa2 100644
  
      redo:
          ipts_min= 1e100;
-@@ -2241,12 +2267,44 @@ static int av_encode(AVFormatContext **output_files,
+@@ -2241,12 +2253,44 @@ static int av_encode(AVFormatContext **output_files,
          if (do_pkt_dump) {
              av_pkt_dump_log(NULL, AV_LOG_DEBUG, &pkt, do_hex_dump);
          }
@@ -129,7 +108,7 @@ index e899180..289bfa2 100644
          if (ist->discard)
              goto discard_packet;
  
-@@ -2278,8 +2336,7 @@ static int av_encode(AVFormatContext **output_files,
+@@ -2278,8 +2322,7 @@ static int av_encode(AVFormatContext **output_files,
          }
  
          //fprintf(stderr,"read #%d.%d size=%d\n", ist->file_index, ist->index, pkt.size);
@@ -139,7 +118,7 @@ index e899180..289bfa2 100644
              if (verbose >= 0)
                  fprintf(stderr, "Error while decoding stream #%d.%d\n",
                          ist->file_index, ist->index);
-@@ -2300,7 +2357,7 @@ static int av_encode(AVFormatContext **output_files,
+@@ -2300,7 +2343,7 @@ static int av_encode(AVFormatContext **output_files,
      for(i=0;i<nb_istreams;i++) {
          ist = ist_table[i];
          if (ist->decoding_needed) {


More information about the FFmpeg-soc mailing list