]> git.sesse.net Git - ffmpeg/commitdiff
Merge commit '4227e4fe7443733fb906f6fb6c265105e8269c74'
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 27 Jan 2015 17:16:42 +0000 (18:16 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 27 Jan 2015 17:16:42 +0000 (18:16 +0100)
* commit '4227e4fe7443733fb906f6fb6c265105e8269c74':
  lavf: add a convenience function for adding side data to a stream

Conflicts:
libavformat/internal.h
libavformat/replaygain.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavformat/internal.h
libavformat/replaygain.c
libavformat/utils.c

index ce03dac3dd72756a32371d1408f750b55db5b09e,5b7e426b42aa6940ff348a4ee2203515abd3e519..d56644b8cf8776c0ad8c67748ef3a4b40e1276a7
@@@ -379,61 -359,18 +379,68 @@@ int ff_generate_avci_extradata(AVStrea
   * @param newpath destination path
   * @return        0 or AVERROR on failure
   */
 -static inline int ff_rename(const char *oldpath, const char *newpath)
 +static inline int ff_rename(const char *oldpath, const char *newpath, void *logctx)
  {
 -    if (rename(oldpath, newpath) == -1)
 -        return AVERROR(errno);
 -    return 0;
 +    int ret = 0;
 +    if (rename(oldpath, newpath) == -1) {
 +        ret = AVERROR(errno);
 +        if (logctx)
 +            av_log(logctx, AV_LOG_ERROR, "failed to rename file %s to %s\n", oldpath, newpath);
 +    }
 +    return ret;
  }
  
+ /**
+  * Add new side data to a stream. If a side data of this type already exists, it
+  * is replaced.
+  */
+ uint8_t *ff_stream_new_side_data(AVStream *st, enum AVPacketSideDataType type,
+                                  int size);
 +/**
 + * Allocate extradata with additional FF_INPUT_BUFFER_PADDING_SIZE at end
 + * which is always set to 0.
 + *
 + * @param size size of extradata
 + * @return 0 if OK, AVERROR_xxx on error
 + */
 +int ff_alloc_extradata(AVCodecContext *avctx, int size);
 +
 +/**
 + * Allocate extradata with additional FF_INPUT_BUFFER_PADDING_SIZE at end
 + * which is always set to 0 and fill it from pb.
 + *
 + * @param size size of extradata
 + * @return >= 0 if OK, AVERROR_xxx on error
 + */
 +int ff_get_extradata(AVCodecContext *avctx, AVIOContext *pb, int size);
 +
 +/**
 + * add frame for rfps calculation.
 + *
 + * @param dts timestamp of the i-th frame
 + * @return 0 if OK, AVERROR_xxx on error
 + */
 +int ff_rfps_add_frame(AVFormatContext *ic, AVStream *st, int64_t dts);
 +
 +void ff_rfps_calculate(AVFormatContext *ic);
 +
 +/**
 + * Flags for AVFormatContext.write_uncoded_frame()
 + */
 +enum AVWriteUncodedFrameFlags {
 +
 +    /**
 +     * Query whether the feature is possible on this stream.
 +     * The frame argument is ignored.
 +     */
 +    AV_WRITE_UNCODED_FRAME_QUERY           = 0x0001,
 +
 +};
 +
 +/**
 + * Copies the whilelists from one context to the other
 + */
 +int ff_copy_whitelists(AVFormatContext *dst, AVFormatContext *src);
 +
  #endif /* AVFORMAT_INTERNAL_H */
Simple merge
Simple merge