summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPetri Hintukainen <phintuka@users.sourceforge.net>2011-08-09 16:04:31 +0300
committerPetri Hintukainen <phintuka@users.sourceforge.net>2011-08-09 16:04:31 +0300
commitd211575f64577027568ff85497eb357f878401fb (patch)
tree603448a6e65f872f3c34820d1388e680eefec745 /src
parent7512f3a88f47b32e196f75920480a2d733c9ae61 (diff)
downloadxine-lib-d211575f64577027568ff85497eb357f878401fb.tar.gz
xine-lib-d211575f64577027568ff85497eb357f878401fb.tar.bz2
Cosmetics: reordered functions
Diffstat (limited to 'src')
-rw-r--r--src/combined/ffmpeg/ff_video_decoder.c86
1 files changed, 43 insertions, 43 deletions
diff --git a/src/combined/ffmpeg/ff_video_decoder.c b/src/combined/ffmpeg/ff_video_decoder.c
index 2c2a08cc1..92fee481f 100644
--- a/src/combined/ffmpeg/ff_video_decoder.c
+++ b/src/combined/ffmpeg/ff_video_decoder.c
@@ -862,6 +862,49 @@ static void ff_check_bufsize (ff_video_decoder_t *this, int size) {
}
}
+static int ff_vc1_find_header(ff_video_decoder_t *this, buf_element_t *buf)
+{
+ uint8_t *p = buf->content;
+
+ if (!p[0] && !p[1] && p[2] == 1 && p[3] == 0x0f) {
+ int i;
+
+ this->context->extradata = calloc(1, buf->size);
+ this->context->extradata_size = 0;
+
+ for (i = 0; i < buf->size && i < 128; i++) {
+ if (!p[i] && !p[i+1] && p[i+2]) {
+ lprintf("00 00 01 %02x at %d\n", p[i+3], i);
+ if (p[i+3] != 0x0e && p[i+3] != 0x0f)
+ break;
+ }
+ this->context->extradata[i] = p[i];
+ this->context->extradata_size++;
+ }
+
+ lprintf("ff_video_decoder: found VC1 sequence header\n");
+ return 1;
+ }
+
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "ffmpeg_video_dec: VC1 extradata missing !\n");
+ return 0;
+}
+
+static int ff_check_extradata(ff_video_decoder_t *this, unsigned int codec_type, buf_element_t *buf)
+{
+ if (this->context && this->context->extradata)
+ return 1;
+
+ switch (codec_type) {
+ case BUF_VIDEO_VC1:
+ return ff_vc1_find_header(this, buf);
+ default:;
+ }
+
+ return 1;
+}
+
static void ff_handle_preview_buffer (ff_video_decoder_t *this, buf_element_t *buf) {
int codec_type;
@@ -1223,49 +1266,6 @@ static void ff_check_pts_tagging(ff_video_decoder_t *this, uint64_t pts)
}
#endif /* AVCODEC_HAS_REORDERED_OPAQUE */
-static int ff_vc1_find_header(ff_video_decoder_t *this, buf_element_t *buf)
-{
- uint8_t *p = buf->content;
-
- if (!p[0] && !p[1] && p[2] == 1 && p[3] == 0x0f) {
- int i;
-
- this->context->extradata = calloc(1, buf->size);
- this->context->extradata_size = 0;
-
- for (i = 0; i < buf->size && i < 128; i++) {
- if (!p[i] && !p[i+1] && p[i+2]) {
- lprintf("00 00 01 %02x at %d\n", p[i+3], i);
- if (p[i+3] != 0x0e && p[i+3] != 0x0f)
- break;
- }
- this->context->extradata[i] = p[i];
- this->context->extradata_size++;
- }
-
- lprintf("ff_video_decoder: found VC1 sequence header\n");
- return 1;
- }
-
- xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
- "ffmpeg_video_dec: VC1 extradata missing !\n");
- return 0;
-}
-
-static int ff_check_extradata(ff_video_decoder_t *this, unsigned int codec_type, buf_element_t *buf)
-{
- if (this->context && this->context->extradata)
- return 1;
-
- switch (codec_type) {
- case BUF_VIDEO_VC1:
- return ff_vc1_find_header(this, buf);
- default:;
- }
-
- return 1;
-}
-
static void ff_handle_buffer (ff_video_decoder_t *this, buf_element_t *buf) {
uint8_t *chunk_buf = this->buf;
AVRational avr00 = {0, 1};