af_resample: preserve frame properties
(cherry picked from commit dcc7e4bf1d)
			
			
This commit is contained in:
		
				
					committed by
					
						
						Reinhard Tartler
					
				
			
			
				
	
			
			
			
						parent
						
							bc2c9a479a
						
					
				
				
					commit
					7933039ade
				
			@@ -252,6 +252,14 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        if (ret > 0) {
 | 
					        if (ret > 0) {
 | 
				
			||||||
            out->nb_samples = ret;
 | 
					            out->nb_samples = ret;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            ret = av_frame_copy_props(out, in);
 | 
				
			||||||
 | 
					            if (ret < 0) {
 | 
				
			||||||
 | 
					                av_frame_free(&out);
 | 
				
			||||||
 | 
					                goto fail;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            out->sample_rate = outlink->sample_rate;
 | 
				
			||||||
            if (in->pts != AV_NOPTS_VALUE) {
 | 
					            if (in->pts != AV_NOPTS_VALUE) {
 | 
				
			||||||
                out->pts = av_rescale_q(in->pts, inlink->time_base,
 | 
					                out->pts = av_rescale_q(in->pts, inlink->time_base,
 | 
				
			||||||
                                            outlink->time_base) -
 | 
					                                            outlink->time_base) -
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user