History

Merge commit '6896f95b2483e52e717e2c75a4fd24fcb0e14b67'

* commit '6896f95b2483e52e717e2c75a4fd24fcb0e14b67': vorbis_parser: add an AV prefix to VorbisParseContext Conflicts: libavcodec/vorbis_parser.c

Michael Niedermayer committed 12 years ago

Commit 5f7887c2 parents a061702 6896f954 files · +16 −16Browse files

Unified · Split

4 files
  1. libavcodec/libvorbisenc.c +1 −1
  2. libavcodec/vorbis_parser.c +8 −8
  3. libavcodec/vorbis_parser.h +6 −6
  4. libavformat/oggparsevorbis.c +1 −1
libavcodec/libvorbisenc.c+1−1
@@ -49,7 +49,7 @@ typedef struct LibvorbisEncContext { · 48 unmodified lines
4949 int dsp_initialized; /**< vd has been initialized */
5050 vorbis_comment vc; /**< VorbisComment info */
5151 double iblock; /**< impulse block bias option */
52− VorbisParseContext vp; /**< parse context to get durations */
52+ AVVorbisParseContext vp; /**< parse context to get durations */
5353 AudioFrameQueue afq; /**< frame queue for timestamps */
5454 } LibvorbisEncContext;
5555
libavcodec/vorbis_parser.c+8−8
@@ -38,7 +38,7 @@ static const AVClass vorbis_parser_class = { · 37 unmodified lines
3838 .version = LIBAVUTIL_VERSION_INT,
3939 };
4040
41−static int parse_id_header(VorbisParseContext *s,
41+static int parse_id_header(AVVorbisParseContext *s,
4242 const uint8_t *buf, int buf_size)
4343 {
4444 /* Id header should be 30 bytes */
@@ -70,7 +70,7 @@ static int parse_id_header(VorbisParseContext *s, · 25 unmodified lines
7070 return 0;
7171 }
7272
73−static int parse_setup_header(VorbisParseContext *s,
73+static int parse_setup_header(AVVorbisParseContext *s,
7474 const uint8_t *buf, int buf_size)
7575 {
7676 GetBitContext gb, gb0;
@@ -181,7 +181,7 @@ bad_header: · 104 unmodified lines
181181 return ret;
182182 }
183183
184−int avpriv_vorbis_parse_extradata(AVCodecContext *avctx, VorbisParseContext *s)
184+int avpriv_vorbis_parse_extradata(AVCodecContext *avctx, AVVorbisParseContext *s)
185185 {
186186 uint8_t *header_start[3];
187187 int header_len[3];
@@ -209,7 +209,7 @@ int avpriv_vorbis_parse_extradata(AVCodecContext *avctx, VorbisParseContext *s) · 21 unmodified lines
209209 return 0;
210210 }
211211
212−int avpriv_vorbis_parse_frame_flags(VorbisParseContext *s, const uint8_t *buf,
212+int avpriv_vorbis_parse_frame_flags(AVVorbisParseContext *s, const uint8_t *buf,
213213 int buf_size, int *flags)
214214 {
215215 int duration = 0;
@@ -258,13 +258,13 @@ bad_packet: · 42 unmodified lines
258258 return duration;
259259 }
260260
261−int avpriv_vorbis_parse_frame(VorbisParseContext *s, const uint8_t *buf,
261+int avpriv_vorbis_parse_frame(AVVorbisParseContext *s, const uint8_t *buf,
262262 int buf_size)
263263 {
264264 return avpriv_vorbis_parse_frame_flags(s, buf, buf_size, NULL);
265265 }
266266
267−void avpriv_vorbis_parse_reset(VorbisParseContext *s)
267+void avpriv_vorbis_parse_reset(AVVorbisParseContext *s)
268268 {
269269 if (s->valid_extradata)
270270 s->previous_blocksize = s->blocksize[0];
@@ -275,7 +275,7 @@ static int vorbis_parse(AVCodecParserContext *s1, AVCodecContext *avctx, · 4 unmodified lines
275275 const uint8_t **poutbuf, int *poutbuf_size,
276276 const uint8_t *buf, int buf_size)
277277 {
278− VorbisParseContext *s = s1->priv_data;
278+ AVVorbisParseContext *s = s1->priv_data;
279279 int duration;
280280
281281 if (!s->extradata_parsed && avctx->extradata && avctx->extradata_size)
@@ -295,7 +295,7 @@ end: · 13 unmodified lines
295295
296296 AVCodecParser ff_vorbis_parser = {
297297 .codec_ids = { AV_CODEC_ID_VORBIS },
298− .priv_data_size = sizeof(VorbisParseContext),
298+ .priv_data_size = sizeof(AVVorbisParseContext),
299299 .parser_parse = vorbis_parse,
300300 };
301301 #endif /* CONFIG_VORBIS_PARSER */
libavcodec/vorbis_parser.h+6−6
@@ -30,7 +30,7 @@ · 29 unmodified lines
3030
3131 #include "avcodec.h"
3232
33−typedef struct VorbisParseContext {
33+typedef struct AVVorbisParseContext {
3434 const AVClass *class;
3535 int extradata_parsed; ///< we have attempted to parse extradata
3636 int valid_extradata; ///< extradata is valid, so we can calculate duration
@@ -40,7 +40,7 @@ typedef struct VorbisParseContext { · 3 unmodified lines
4040 int mode_count; ///< number of modes
4141 int mode_mask; ///< bitmask used to get the mode in each packet
4242 int prev_mask; ///< bitmask used to get the previous mode flag in each packet
43−} VorbisParseContext;
43+} AVVorbisParseContext;
4444
4545 /**
4646 * Initialize the Vorbis parser using headers in the extradata.
@@ -48,7 +48,7 @@ typedef struct VorbisParseContext { · 1 unmodified line
4848 * @param avctx codec context
4949 * @param s Vorbis parser context
5050 */
51−int avpriv_vorbis_parse_extradata(AVCodecContext *avctx, VorbisParseContext *s);
51+int avpriv_vorbis_parse_extradata(AVCodecContext *avctx, AVVorbisParseContext *s);
5252
5353 #define VORBIS_FLAG_HEADER 0x00000001
5454 #define VORBIS_FLAG_COMMENT 0x00000002
@@ -65,7 +65,7 @@ int avpriv_vorbis_parse_extradata(AVCodecContext *avctx, VorbisParseContext *s); · 10 unmodified lines
6565 * @param buf_size size of the buffer
6666 * @param flags flags for special frames
6767 */
68−int avpriv_vorbis_parse_frame_flags(VorbisParseContext *s, const uint8_t *buf,
68+int avpriv_vorbis_parse_frame_flags(AVVorbisParseContext *s, const uint8_t *buf,
6969 int buf_size, int *flags);
7070
7171 /**
@@ -78,9 +78,9 @@ int avpriv_vorbis_parse_frame_flags(VorbisParseContext *s, const uint8_t *buf, · 6 unmodified lines
7878 * @param buf buffer containing a Vorbis frame
7979 * @param buf_size size of the buffer
8080 */
81−int avpriv_vorbis_parse_frame(VorbisParseContext *s, const uint8_t *buf,
81+int avpriv_vorbis_parse_frame(AVVorbisParseContext *s, const uint8_t *buf,
8282 int buf_size);
8383
84−void avpriv_vorbis_parse_reset(VorbisParseContext *s);
84+void avpriv_vorbis_parse_reset(AVVorbisParseContext *s);
8585
8686 #endif /* AVCODEC_VORBIS_PARSER_H */
libavformat/oggparsevorbis.c+1−1
@@ -213,7 +213,7 @@ int ff_vorbis_comment(AVFormatContext *as, AVDictionary **m, · 212 unmodified lines
213213 struct oggvorbis_private {
214214 unsigned int len[3];
215215 unsigned char *packet[3];
216− VorbisParseContext vp;
216+ AVVorbisParseContext vp;
217217 int64_t final_pts;
218218 int final_duration;
219219 };

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t