mirror of
				https://github.com/nyanmisaka/ffmpeg-rockchip.git
				synced 2025-10-31 20:42:49 +08:00 
			
		
		
		
	avformat/mxfenc: Correct the Sample rate for PCM outside D10
Based on mail from IRT Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
		| @@ -21,7 +21,7 @@ | |||||||
|  */ |  */ | ||||||
|  |  | ||||||
| /* | /* | ||||||
|  * signal_standard, color_siting, store_user_comments and klv_fill_key version |  * signal_standard, color_siting, store_user_comments, sample rate and klv_fill_key version | ||||||
|  * fixes sponsored by NOA GmbH |  * fixes sponsored by NOA GmbH | ||||||
|  */ |  */ | ||||||
|  |  | ||||||
| @@ -1034,8 +1034,19 @@ static void mxf_write_generic_desc(AVFormatContext *s, AVStream *st, const UID k | |||||||
|     avio_wb32(pb, st->index+2); |     avio_wb32(pb, st->index+2); | ||||||
|  |  | ||||||
|     mxf_write_local_tag(pb, 8, 0x3001); |     mxf_write_local_tag(pb, 8, 0x3001); | ||||||
|  |     if (s->oformat == &ff_mxf_d10_muxer) { | ||||||
|         avio_wb32(pb, mxf->time_base.den); |         avio_wb32(pb, mxf->time_base.den); | ||||||
|         avio_wb32(pb, mxf->time_base.num); |         avio_wb32(pb, mxf->time_base.num); | ||||||
|  |     } else { | ||||||
|  |         if (st->codecpar->codec_id == AV_CODEC_ID_PCM_S16LE || | ||||||
|  |             st->codecpar->codec_id == AV_CODEC_ID_PCM_S24LE) { | ||||||
|  |             avio_wb32(pb, st->codecpar->sample_rate); | ||||||
|  |             avio_wb32(pb, 1); | ||||||
|  |         } else { | ||||||
|  |             avio_wb32(pb, mxf->time_base.den); | ||||||
|  |             avio_wb32(pb, mxf->time_base.num); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  |  | ||||||
|     mxf_write_local_tag(pb, 16, 0x3004); |     mxf_write_local_tag(pb, 16, 0x3004); | ||||||
|     avio_write(pb, mxf_essence_container_uls[sc->index].container_ul, 16); |     avio_write(pb, mxf_essence_container_uls[sc->index].container_ul, 16); | ||||||
|   | |||||||
| @@ -1,4 +1,4 @@ | |||||||
| 8868ae16d99ed03916e9dc7105285471 *tests/data/fate/copy-trac4914.mxf | d51f6bcc96885a2ce8517ae8c774f610 *tests/data/fate/copy-trac4914.mxf | ||||||
| 560697 tests/data/fate/copy-trac4914.mxf | 560697 tests/data/fate/copy-trac4914.mxf | ||||||
| #tb 0: 1001/30000 | #tb 0: 1001/30000 | ||||||
| #media_type 0: video | #media_type 0: video | ||||||
|   | |||||||
| @@ -1,9 +1,9 @@ | |||||||
| eaac3125ac1a61fe5f968c7af83fa71e *./tests/data/lavf/lavf.mxf | 1c06a9d69b6e309579784db5ecb0b69f *./tests/data/lavf/lavf.mxf | ||||||
| 525369 ./tests/data/lavf/lavf.mxf | 525369 ./tests/data/lavf/lavf.mxf | ||||||
| ./tests/data/lavf/lavf.mxf CRC=0x8dddfaab | ./tests/data/lavf/lavf.mxf CRC=0x8dddfaab | ||||||
| 1562530330b13e9e70f522fe20265632 *./tests/data/lavf/lavf.mxf | 50b4f9ca0493e6d83f4c52dc3aa2b7a5 *./tests/data/lavf/lavf.mxf | ||||||
| 560697 ./tests/data/lavf/lavf.mxf | 560697 ./tests/data/lavf/lavf.mxf | ||||||
| ./tests/data/lavf/lavf.mxf CRC=0xf21b1b48 | ./tests/data/lavf/lavf.mxf CRC=0xf21b1b48 | ||||||
| e07858715997313ae66a1cdd6fde5f66 *./tests/data/lavf/lavf.mxf | 4b71b154ae37364c8028cb50850a54c5 *./tests/data/lavf/lavf.mxf | ||||||
| 525369 ./tests/data/lavf/lavf.mxf | 525369 ./tests/data/lavf/lavf.mxf | ||||||
| ./tests/data/lavf/lavf.mxf CRC=0x8dddfaab | ./tests/data/lavf/lavf.mxf CRC=0x8dddfaab | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Michael Niedermayer
					Michael Niedermayer