]> git.sesse.net Git - ffmpeg/commitdiff
Merge commit '6896f95b2483e52e717e2c75a4fd24fcb0e14b67'
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 6 Nov 2014 10:00:42 +0000 (11:00 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 6 Nov 2014 10:06:19 +0000 (11:06 +0100)
* commit '6896f95b2483e52e717e2c75a4fd24fcb0e14b67':
  vorbis_parser: add an AV prefix to VorbisParseContext

Conflicts:
libavcodec/vorbis_parser.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavcodec/libvorbisenc.c
libavcodec/vorbis_parser.c
libavcodec/vorbis_parser.h
libavformat/oggparsevorbis.c

index 96af53614b5c57e1dfdd61fe622a52108bbc3f50,fc4a0a471601cdb30cdb5b354b54d9e01da8f132..0feb6813b8ab36c6d41241332b1cb8fdadafa5cf
@@@ -48,13 -56,14 +48,13 @@@ typedef struct LibvorbisEncContext 
      int eof;                            /**< end-of-file flag               */
      int dsp_initialized;                /**< vd has been initialized        */
      vorbis_comment vc;                  /**< VorbisComment info             */
 -    ogg_packet op;                      /**< ogg packet                     */
      double iblock;                      /**< impulse block bias option      */
-     VorbisParseContext vp;              /**< parse context to get durations */
+     AVVorbisParseContext vp;            /**< parse context to get durations */
      AudioFrameQueue afq;                /**< frame queue for timestamps     */
 -} LibvorbisContext;
 +} LibvorbisEncContext;
  
  static const AVOption options[] = {
 -    { "iblock", "Sets the impulse block bias", offsetof(LibvorbisContext, iblock), AV_OPT_TYPE_DOUBLE, { .dbl = 0 }, -15, 0, AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM },
 +    { "iblock", "Sets the impulse block bias", offsetof(LibvorbisEncContext, iblock), AV_OPT_TYPE_DOUBLE, { .dbl = 0 }, -15, 0, AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM },
      { NULL }
  };
  
index d75fb962d441b1a190104ed5d79a9516f33e0f21,b08846518a50478935b950474eeb1367b095a7e7..30843294cffefe857b268a64f92d31dca6cbe4bd
@@@ -209,8 -209,8 +209,8 @@@ int avpriv_vorbis_parse_extradata(AVCod
      return 0;
  }
  
- int avpriv_vorbis_parse_frame_flags(VorbisParseContext *s, const uint8_t *buf,
 -int avpriv_vorbis_parse_frame(AVVorbisParseContext *s, const uint8_t *buf,
 -                              int buf_size)
++int avpriv_vorbis_parse_frame_flags(AVVorbisParseContext *s, const uint8_t *buf,
 +                                    int buf_size, int *flags)
  {
      int duration = 0;
  
@@@ -258,16 -242,10 +258,16 @@@ bad_packet
      return duration;
  }
  
- int avpriv_vorbis_parse_frame(VorbisParseContext *s, const uint8_t *buf,
++int avpriv_vorbis_parse_frame(AVVorbisParseContext *s, const uint8_t *buf,
 +                              int buf_size)
 +{
 +    return avpriv_vorbis_parse_frame_flags(s, buf, buf_size, NULL);
 +}
 +
- void avpriv_vorbis_parse_reset(VorbisParseContext *s)
+ void avpriv_vorbis_parse_reset(AVVorbisParseContext *s)
  {
      if (s->valid_extradata)
 -        s->previous_blocksize = s->mode_blocksize[0];
 +        s->previous_blocksize = s->blocksize[0];
  }
  
  #if CONFIG_VORBIS_PARSER
index aa7c1b0444c9cda0826a14ddccce361b01a31696,414a04b4a373f5a9139b79fd81c0c4b3c18c83be..6e9a319e5029e3e34e9f09127f7fde7f67b6d30d
@@@ -48,26 -48,8 +48,26 @@@ typedef struct AVVorbisParseContext 
   * @param avctx codec context
   * @param s     Vorbis parser context
   */
- int avpriv_vorbis_parse_extradata(AVCodecContext *avctx, VorbisParseContext *s);
+ int avpriv_vorbis_parse_extradata(AVCodecContext *avctx, AVVorbisParseContext *s);
  
- int avpriv_vorbis_parse_frame_flags(VorbisParseContext *s, const uint8_t *buf,
 +#define VORBIS_FLAG_HEADER  0x00000001
 +#define VORBIS_FLAG_COMMENT 0x00000002
 +
 +/**
 + * Get the duration for a Vorbis packet.
 + *
 + * avpriv_vorbis_parse_extradata() must have been successfully called prior to
 + * this in order for a correct duration to be returned. If @p flags is @c NULL,
 + * special frames are considered invalid.
 + *
 + * @param s        Vorbis parser context
 + * @param buf      buffer containing a Vorbis frame
 + * @param buf_size size of the buffer
 + * @param flags    flags for special frames
 + */
++int avpriv_vorbis_parse_frame_flags(AVVorbisParseContext *s, const uint8_t *buf,
 +                                    int buf_size, int *flags);
 +
  /**
   * Get the duration for a Vorbis packet.
   *
Simple merge