Changeset 199
- Timestamp:
- 12/09/07 01:31:14
(9 months ago)
- Author:
- sip
- Message:
Fixed seg fault in h264 recording. Still not working perfectly video track is unusable, hint track works fine.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r197 |
r199 |
|
| 170 | 170 | t->sampleId++; |
|---|
| 171 | 171 | |
|---|
| 172 | | ast_log(LOG_DEBUG, "New video hint\n"); |
|---|
| | 172 | ast_log(LOG_DEBUG, "New video hint [%d,%d,%d,%d]\n",intra,payload,skip,prependLength); |
|---|
| 173 | 173 | |
|---|
| 174 | 174 | /* Add hint */ |
|---|
| … | … | |
| 757 | 757 | } |
|---|
| 758 | 758 | } else if (f->subclass & AST_FORMAT_H264) { |
|---|
| | 759 | /* Get packet type */ |
|---|
| | 760 | unsigned char nal = frame[0]; |
|---|
| | 761 | unsigned char type = nal & 0x1f; |
|---|
| 759 | 762 | /* All intra & first*/ |
|---|
| 760 | 763 | intra = 1; |
|---|
| 761 | 764 | first = 1; |
|---|
| 762 | | /* Save all to the rtp payload */ |
|---|
| 763 | | video_payload = f->datalen; |
|---|
| 764 | | /* Don't add frame data to payload */ |
|---|
| 765 | | skip = f->datalen; |
|---|
| 766 | | /* And add the data to the frame but not associated with the hint track */ |
|---|
| 767 | | prependBuffer = f->data+1; |
|---|
| 768 | | prependLength = f->datalen-1; |
|---|
| | 765 | /* Check nal type */ |
|---|
| | 766 | if (type<23) |
|---|
| | 767 | { |
|---|
| | 768 | /* And add the data to the frame but not associated with the hint track */ |
|---|
| | 769 | prependBuffer = "\0\0\1"; |
|---|
| | 770 | prependLength = 3; |
|---|
| | 771 | /* Set payload and skip */ |
|---|
| | 772 | video_payload = 0; |
|---|
| | 773 | skip = 0; |
|---|
| | 774 | } |
|---|
| 769 | 775 | } else { |
|---|
| 770 | 776 | /* Unknown code free it */ |
|---|
Download in other formats:
|
|