Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/mpc-hc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXhmikosR <xhmikosr@users.sourceforge.net>2010-04-09 18:12:59 +0400
committerXhmikosR <xhmikosr@users.sourceforge.net>2010-04-09 18:12:59 +0400
commitefbc9d9043ff8ff92716ddd00a5f61412d535593 (patch)
tree8f3e621f756cf1f5b4d64d97964c7e7abd8aaf08 /src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/h263_parser.c
parentdf6b139a6d9027156f614b68687e039e3a5854db (diff)
revert r1783
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@1785 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/h263_parser.c')
-rw-r--r--src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/h263_parser.c45
1 files changed, 19 insertions, 26 deletions
diff --git a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/h263_parser.c b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/h263_parser.c
index cf6e47ea1..44f632e92 100644
--- a/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/h263_parser.c
+++ b/src/filters/transform/MPCVideoDec/ffmpeg/libavcodec/h263_parser.c
@@ -26,44 +26,37 @@
#include "parser.h"
-int ff_h263_find_frame_end(ParseContext *pc, const uint8_t *buf, int buf_size)
-{
+int ff_h263_find_frame_end(ParseContext *pc, const uint8_t *buf, int buf_size){
int vop_found, i;
uint32_t state;
- vop_found = pc->frame_start_found;
- state = pc->state;
+ vop_found= pc->frame_start_found;
+ state= pc->state;
- i = 0;
- if(!vop_found)
- {
- for(i = 0; i < buf_size; i++)
- {
- state = (state << 8) | buf[i];
- if(state >> (32 - 22) == 0x20)
- {
+ i=0;
+ if(!vop_found){
+ for(i=0; i<buf_size; i++){
+ state= (state<<8) | buf[i];
+ if(state>>(32-22) == 0x20){
i++;
- vop_found = 1;
+ vop_found=1;
break;
}
}
}
- if(vop_found)
- {
- for(; i < buf_size; i++)
- {
- state = (state << 8) | buf[i];
- if(state >> (32 - 22) == 0x20)
- {
- pc->frame_start_found = 0;
- pc->state = -1;
- return i - 3;
- }
+ if(vop_found){
+ for(; i<buf_size; i++){
+ state= (state<<8) | buf[i];
+ if(state>>(32-22) == 0x20){
+ pc->frame_start_found=0;
+ pc->state=-1;
+ return i-3;
}
+ }
}
- pc->frame_start_found = vop_found;
- pc->state = state;
+ pc->frame_start_found= vop_found;
+ pc->state= state;
return END_NOT_FOUND;
}