Changeset 30
- Timestamp:
- 01/26/08 19:49:56
(8 months ago)
- Author:
- sip
- Message:
More checks
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r17 |
r30 |
|
| 304 | 304 | //Decodificamos |
|---|
| 305 | 305 | int got_picture=0; |
|---|
| | 306 | int readed = 0; |
|---|
| | 307 | |
|---|
| | 308 | // Check total length |
|---|
| | 309 | if (bufLen+inLen+FF_INPUT_BUFFER_PADDING_SIZE+2>bufSize) |
|---|
| | 310 | { |
|---|
| | 311 | // Reset buffer |
|---|
| | 312 | bufLen = 0; |
|---|
| | 313 | |
|---|
| | 314 | // Exit |
|---|
| | 315 | return 0; |
|---|
| | 316 | } |
|---|
| 306 | 317 | |
|---|
| 307 | 318 | /* Get header */ |
|---|
| … | … | |
| 346 | 357 | |
|---|
| 347 | 358 | //Decodificamos |
|---|
| 348 | | avcodec_decode_video(ctx,picture,&got_picture,buffer,bufLen); |
|---|
| | 359 | readed = avcodec_decode_video(ctx,picture,&got_picture,buffer,bufLen); |
|---|
| 349 | 360 | |
|---|
| 350 | 361 | //Y resetamos el buffer |
|---|
| … | … | |
| 353 | 364 | |
|---|
| 354 | 365 | //Si hay picture |
|---|
| 355 | | if (got_picture) |
|---|
| | 366 | if (got_picture && readed>0) |
|---|
| 356 | 367 | { |
|---|
| 357 | 368 | if(ctx->width==0 || ctx->height==0) |
|---|
| r17 |
r30 |
|
| 666 | 666 | } |
|---|
| 667 | 667 | |
|---|
| 668 | | //Lo sacamos |
|---|
| 669 | | videoOutput->NextFrame(videoDecoder->GetFrame()); |
|---|
| | 668 | //Check size |
|---|
| | 669 | if (width && height) |
|---|
| | 670 | //Lo sacamos |
|---|
| | 671 | videoOutput->NextFrame(videoDecoder->GetFrame()); |
|---|
| 670 | 672 | |
|---|
| 671 | 673 | //Aumentamos el numero de frames y de bytes |
|---|
Download in other formats:
|
|