Mercurial > libavcodec.hg
comparison h264.c @ 2867:7c7edddaa835 libavcodec
dont be so picky with .mp4 ... fixes Mr&MrsSmith.mp4
author | michael |
---|---|
date | Sat, 10 Sep 2005 01:13:10 +0000 |
parents | 3b920e274b26 |
children | a95e55679dfa |
comparison
equal
deleted
inserted
replaced
2866:5cbc5bdbfa61 | 2867:7c7edddaa835 |
---|---|
7277 MpegEncContext * const s = &h->s; | 7277 MpegEncContext * const s = &h->s; |
7278 AVCodecContext * const avctx= s->avctx; | 7278 AVCodecContext * const avctx= s->avctx; |
7279 int buf_index=0; | 7279 int buf_index=0; |
7280 #if 0 | 7280 #if 0 |
7281 int i; | 7281 int i; |
7282 for(i=0; i<32; i++){ | 7282 for(i=0; i<50; i++){ |
7283 printf("%X ", buf[i]); | 7283 av_log(NULL, AV_LOG_ERROR,"%02X ", buf[i]); |
7284 } | 7284 } |
7285 #endif | 7285 #endif |
7286 h->slice_num = 0; | 7286 h->slice_num = 0; |
7287 s->current_picture_ptr= NULL; | 7287 s->current_picture_ptr= NULL; |
7288 for(;;){ | 7288 for(;;){ |
7482 // Decode sps from avcC | 7482 // Decode sps from avcC |
7483 cnt = *(p+5) & 0x1f; // Number of sps | 7483 cnt = *(p+5) & 0x1f; // Number of sps |
7484 p += 6; | 7484 p += 6; |
7485 for (i = 0; i < cnt; i++) { | 7485 for (i = 0; i < cnt; i++) { |
7486 nalsize = BE_16(p) + 2; | 7486 nalsize = BE_16(p) + 2; |
7487 if(decode_nal_units(h, p, nalsize) != nalsize) { | 7487 if(decode_nal_units(h, p, nalsize) < 0) { |
7488 av_log(avctx, AV_LOG_ERROR, "Decoding sps %d from avcC failed\n", i); | 7488 av_log(avctx, AV_LOG_ERROR, "Decoding sps %d from avcC failed\n", i); |
7489 return -1; | 7489 return -1; |
7490 } | 7490 } |
7491 p += nalsize; | 7491 p += nalsize; |
7492 } | 7492 } |