avformat/hlsenc: Check ret
Fixes: CID1609624 Unused value Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 7e577165c101513b4d8afe164e604cbef6901546) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
		
							parent
							
								
									9350f387e8
								
							
						
					
					
						commit
						444789f647
					
				@ -2601,8 +2601,10 @@ static int hls_write_packet(AVFormatContext *s, AVPacket *pkt)
 | 
				
			|||||||
                           " will retry with a new http session.\n");
 | 
					                           " will retry with a new http session.\n");
 | 
				
			||||||
                    ff_format_io_close(s, &vs->out);
 | 
					                    ff_format_io_close(s, &vs->out);
 | 
				
			||||||
                    ret = hlsenc_io_open(s, &vs->out, filename, &options);
 | 
					                    ret = hlsenc_io_open(s, &vs->out, filename, &options);
 | 
				
			||||||
                    reflush_dynbuf(vs, &range_length);
 | 
					                    if (ret >= 0) {
 | 
				
			||||||
                    ret = hlsenc_io_close(s, &vs->out, filename);
 | 
					                        reflush_dynbuf(vs, &range_length);
 | 
				
			||||||
 | 
					                        ret = hlsenc_io_close(s, &vs->out, filename);
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
                av_dict_free(&options);
 | 
					                av_dict_free(&options);
 | 
				
			||||||
                av_freep(&vs->temp_buffer);
 | 
					                av_freep(&vs->temp_buffer);
 | 
				
			||||||
@ -2613,6 +2615,9 @@ static int hls_write_packet(AVFormatContext *s, AVPacket *pkt)
 | 
				
			|||||||
                hls_rename_temp_file(s, oc);
 | 
					                hls_rename_temp_file(s, oc);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if (ret < 0)
 | 
				
			||||||
 | 
					            return ret;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        old_filename = av_strdup(oc->url);
 | 
					        old_filename = av_strdup(oc->url);
 | 
				
			||||||
        if (!old_filename) {
 | 
					        if (!old_filename) {
 | 
				
			||||||
            return AVERROR(ENOMEM);
 | 
					            return AVERROR(ENOMEM);
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user