Changeset 7d1cff0bb27541abd0f34bd6fd1224c437d83632
- Timestamp:
- 16/10/06 23:58:12
(2 years ago)
- Author:
- Derk-Jan Hartman <hartman@videolan.org>
- git-committer:
- Derk-Jan Hartman <hartman@videolan.org> 1161035892 +0000
- git-parent:
[e7ad059e36db8fa273b6bc7a4f2abb25d4c8fe8f]
- git-author:
- Derk-Jan Hartman <hartman@videolan.org> 1161035892 +0000
- Message:
Apparently ffmpeg doesn't like how we were feeding the SPS/PPS to it. At least this way it works. There is still something wrong. Instead of directly starting to work after the SPS/PPS is received (from MPEG-TS), it waits 1 extra I frame. If I just output the SPS/PPS directly instead of reinserting it, it works directly after the SPS/PPS is received on the I frame directly following them.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r4ecb862 |
r7d1cff0 |
|
| 8 | 8 | * Eric Petit <titer@videolan.org> |
|---|
| 9 | 9 | * Gildas Bazin <gbazin@videolan.org> |
|---|
| | 10 | * Derk-Jan Hartman <hartman at videolan dot org> |
|---|
| 10 | 11 | * |
|---|
| 11 | 12 | * This program is free software; you can redistribute it and/or modify |
|---|
| … | … | |
| 70 | 71 | vlc_bool_t b_sps; |
|---|
| 71 | 72 | vlc_bool_t b_pps; |
|---|
| | 73 | vlc_bool_t b_header; |
|---|
| 72 | 74 | |
|---|
| 73 | 75 | /* avcC data */ |
|---|
| … | … | |
| 161 | 163 | p_sys->p_sps = 0; |
|---|
| 162 | 164 | p_sys->p_pps = 0; |
|---|
| | 165 | p_sys->b_header= VLC_FALSE; |
|---|
| 163 | 166 | |
|---|
| 164 | 167 | p_sys->i_nal_type = -1; |
|---|
| … | … | |
| 221 | 224 | memcpy( p_dec->fmt_out.p_extra, p_sys->p_sps->p_buffer, p_sys->p_sps->i_buffer); |
|---|
| 222 | 225 | memcpy( p_dec->fmt_out.p_extra+p_sys->p_sps->i_buffer, p_sys->p_pps->p_buffer, p_sys->p_pps->i_buffer); |
|---|
| | 226 | p_sys->b_header = VLC_TRUE; |
|---|
| 223 | 227 | |
|---|
| 224 | 228 | /* Set callback */ |
|---|
| … | … | |
| 479 | 483 | #define OUTPUT \ |
|---|
| 480 | 484 | do { \ |
|---|
| | 485 | if( !p_sys->b_header && p_sys->i_frame_type != BLOCK_FLAG_TYPE_I) \ |
|---|
| | 486 | break; \ |
|---|
| | 487 | \ |
|---|
| 481 | 488 | p_pic = block_ChainGather( p_sys->p_frame ); \ |
|---|
| 482 | 489 | p_pic->i_length = 0; /* FIXME */ \ |
|---|
| … | … | |
| 497 | 504 | block_ChainAppend( &p_sps, p_pic ); \ |
|---|
| 498 | 505 | p_pic = block_ChainGather( p_sps ); \ |
|---|
| | 506 | p_sys->b_header = VLC_TRUE; \ |
|---|
| 499 | 507 | } \ |
|---|
| 500 | 508 | } while(0) |
|---|