[FFmpeg-soc] [soc]: r2058 - libavfilter/diffs/04_ffmpeg_filters.diff

vitor subversion at mplayerhq.hu
Sat Mar 29 17:25:40 CET 2008


Author: vitor
Date: Sat Mar 29 17:25:40 2008
New Revision: 2058

Log:
Do proper error handling in ffmpeg.c.

Modified:
   libavfilter/diffs/04_ffmpeg_filters.diff

Modified: libavfilter/diffs/04_ffmpeg_filters.diff
==============================================================================
--- libavfilter/diffs/04_ffmpeg_filters.diff	(original)
+++ libavfilter/diffs/04_ffmpeg_filters.diff	Sat Mar 29 17:25:40 2008
@@ -38,7 +38,7 @@ Index: ffmpeg.c
  } AVInputStream;
  
  typedef struct AVInputFile {
-@@ -288,6 +303,253 @@
+@@ -288,6 +303,254 @@
  static struct termios oldtty;
  #endif
  
@@ -269,8 +269,9 @@ Index: ffmpeg.c
 +    }
 +
 +    if(vfilters) {
-+        avfilter_graph_parse_chain(filt_graph_all, vfilters,
-+                              curr_filter, 0, ist->out_video_filter, 0);
++        if (avfilter_graph_parse_chain(filt_graph_all, vfilters,
++                              curr_filter, 0, ist->out_video_filter, 0) < 0)
++            return -1;
 +    } else {
 +        if(avfilter_link(curr_filter, 0, ist->out_video_filter, 0) < 0)
 +            return -1;
@@ -292,7 +293,7 @@ Index: ffmpeg.c
  static void term_exit(void)
  {
  #ifdef HAVE_TERMIOS_H
-@@ -754,6 +1016,9 @@
+@@ -754,6 +1017,9 @@
      if (nb_frames <= 0)
          return;
  
@@ -302,7 +303,7 @@ Index: ffmpeg.c
      if (ost->video_crop) {
          if (av_picture_crop((AVPicture *)&picture_crop_temp, (AVPicture *)in_picture, dec->pix_fmt, ost->topBand, ost->leftBand) < 0) {
              av_log(NULL, AV_LOG_ERROR, "error cropping picture\n");
-@@ -763,6 +1028,7 @@
+@@ -763,6 +1029,7 @@
      } else {
          formatted_picture = in_picture;
      }
@@ -310,7 +311,7 @@ Index: ffmpeg.c
  
      final_picture = formatted_picture;
      padding_src = formatted_picture;
-@@ -778,12 +1044,14 @@
+@@ -778,12 +1045,14 @@
          }
      }
  
@@ -325,7 +326,7 @@ Index: ffmpeg.c
  
      if (ost->video_pad) {
          av_picture_pad((AVPicture*)final_picture, (AVPicture *)padding_src,
-@@ -1165,6 +1433,17 @@
+@@ -1165,6 +1434,17 @@
                                      &buffer_to_free);
          }
  
@@ -343,7 +344,7 @@ Index: ffmpeg.c
          // preprocess audio (volume)
          if (ist->st->codec->codec_type == CODEC_TYPE_AUDIO) {
              if (audio_volume != 256) {
-@@ -1227,10 +1506,23 @@
+@@ -1227,10 +1507,23 @@
                              do_audio_out(os, ost, ist, data_buf, data_size);
                              break;
                          case CODEC_TYPE_VIDEO:
@@ -367,7 +368,7 @@ Index: ffmpeg.c
                              break;
                          case CODEC_TYPE_SUBTITLE:
                              do_subtitle_out(os, ost, ist, &subtitle,
-@@ -1693,10 +1985,21 @@
+@@ -1693,10 +1986,21 @@
                          fprintf(stderr, "Cannot get resampling context\n");
                          exit(1);
                      }
@@ -389,7 +390,7 @@ Index: ffmpeg.c
                  break;
              case CODEC_TYPE_SUBTITLE:
                  ost->encoding_needed = 1;
-@@ -3804,6 +4107,9 @@
+@@ -3804,6 +4108,9 @@
  #ifdef CONFIG_VHOOK
      { "vhook", HAS_ARG | OPT_EXPERT | OPT_VIDEO, {(void*)add_frame_hooker}, "insert video processing module", "module" },
  #endif



More information about the FFmpeg-soc mailing list